How can I get displayed a picture inside the tooltip?
VBA (MS Access, Excell...)
Set ToolTip1 = CreateObject("Exontrol.ToolTip.1")
With ToolTip1
.HTMLPicture("pic1") = "c:\exontrol\images\zipdisk.gif"
.ShowToolTip "<c><img>pic1</img><br>This is a bit of tooltip with a picture attached."
End With
VB6
Set ToolTip1 = CreateObject("Exontrol.ToolTip.1")
With ToolTip1
.HTMLPicture("pic1") = "c:\exontrol\images\zipdisk.gif"
.ShowToolTip "<c><img>pic1</img><br>This is a bit of tooltip with a picture attached."
End With
VB.NET
' Add 'exontrol.extooltip.dll(ExToolTip.dll)' reference to your project.
Extooltip1 = New exontrol.EXTOOLTIPLib.extooltip()
With Extooltip1
.set_HTMLPicture("pic1","c:\exontrol\images\zipdisk.gif")
.ShowToolTip("<c><img>pic1</img><br>This is a bit of tooltip with a picture attached.")
End With
VB.NET for /COM
AxToolTip1 = CreateObject("Exontrol.ToolTip.1")
With AxToolTip1
.set_HTMLPicture("pic1","c:\exontrol\images\zipdisk.gif")
.ShowToolTip("<c><img>pic1</img><br>This is a bit of tooltip with a picture attached.")
End With
C++
/*
Includes the definition for CreateObject function like follows:
#include <comdef.h>
IUnknownPtr CreateObject( BSTR Object )
{
IUnknownPtr spResult;
spResult.CreateInstance( Object );
return spResult;
};
*/
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXTOOLTIPLib' for the library: 'ExToolTip 1.0 Control Library'
#import <ExToolTip.dll>
using namespace EXTOOLTIPLib;
*/
EXTOOLTIPLib::IToolTipPtr spToolTip1 = ::CreateObject(L"Exontrol.ToolTip.1");
spToolTip1->PutHTMLPicture(L"pic1","c:\\exontrol\\images\\zipdisk.gif");
spToolTip1->ShowToolTip("<c><img>pic1</img><br>This is a bit of tooltip with a picture attached.",vtMissing,vtMissing,vtMissing,vtMissing);
C++ Builder
Extooltiplib_tlb::IToolTipPtr ToolTip1 = Variant::CreateObject(L"Exontrol.ToolTip.1");
ToolTip1->HTMLPicture[L"pic1"] = TVariant("c:\\exontrol\\images\\zipdisk.gif");
ToolTip1->ShowToolTip(TVariant("<c><img>pic1</img><br>This is a bit of tooltip with a picture attached."),TNoParam(),TNoParam(),TNoParam(),TNoParam());
C#
// Add 'exontrol.extooltip.dll(ExToolTip.dll)' reference to your project.
exontrol.EXTOOLTIPLib.extooltip extooltip1 = new exontrol.EXTOOLTIPLib.extooltip();
extooltip1.set_HTMLPicture("pic1","c:\\exontrol\\images\\zipdisk.gif");
extooltip1.ShowToolTip("<c><img>pic1</img><br>This is a bit of tooltip with a picture attached.",null,null,null,null);
JScript/JavaScript
<BODY onload="Init()">
<OBJECT CLASSID="clsid:D3973403-2857-44B5-8031-D2C5BF4005E6" id="ToolTip1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
ToolTip1.HTMLPicture("pic1") = "c:\\exontrol\\images\\zipdisk.gif";
ToolTip1.ShowToolTip("<c><img>pic1</img><br>This is a bit of tooltip with a picture attached.",null,null,null,null);
}
</SCRIPT>
</BODY>
VBScript
<BODY onload="Init()">
<OBJECT CLASSID="clsid:D3973403-2857-44B5-8031-D2C5BF4005E6" id="ToolTip1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ToolTip1
.HTMLPicture("pic1") = "c:\exontrol\images\zipdisk.gif"
.ShowToolTip "<c><img>pic1</img><br>This is a bit of tooltip with a picture attached."
End With
End Function
</SCRIPT>
</BODY>
C# for /COM
EXTOOLTIPLib.ToolTip axToolTip1 = new EXTOOLTIPLib.ToolTip();
axToolTip1.set_HTMLPicture("pic1","c:\\exontrol\\images\\zipdisk.gif");
axToolTip1.ShowToolTip("<c><img>pic1</img><br>This is a bit of tooltip with a picture attached.",null,null,null,null);
X++ (Dynamics Ax 2009)
public void init()
{
COM com_extooltip1;
anytype extooltip1;
;
super();
// Add 'extooltip.dll(ExToolTip.dll)' reference to your project.
extooltip1 = COM::createFromObject(new EXTOOLTIPLib.extooltip()); com_extooltip1 = extooltip1;
com_extooltip1.HTMLPicture("pic1","c:\\exontrol\\images\\zipdisk.gif");
com_extooltip1.ShowToolTip("<c><img>pic1</img><br>This is a bit of tooltip with a picture attached.");
}
Delphi 8 (.NET only)
AxToolTip1 := (ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.ToolTip.1')) as EXTOOLTIPLib.ToolTip);
with AxToolTip1 do
begin
set_HTMLPicture('pic1','c:\exontrol\images\zipdisk.gif');
ShowToolTip('<c><img>pic1</img><br>This is a bit of tooltip with a picture attached.',Nil,Nil,Nil,Nil);
end
Delphi (standard)
ToolTip1 := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.ToolTip.1'))) as EXTOOLTIPLib_TLB.ToolTip);
with ToolTip1 do
begin
HTMLPicture['pic1'] := 'c:\exontrol\images\zipdisk.gif';
ShowToolTip('<c><img>pic1</img><br>This is a bit of tooltip with a picture attached.',Null,Null,Null,Null);
end
VFP
thisform.ToolTip1 = CreateObject("Exontrol.ToolTip.1")
with thisform.ToolTip1
.Object.HTMLPicture("pic1") = "c:\exontrol\images\zipdisk.gif"
.ShowToolTip("<c><img>pic1</img><br>This is a bit of tooltip with a picture attached.")
endwith
dBASE Plus
local oToolTip
oToolTip = new OleAutoClient("Exontrol.ToolTip.1")
oToolTip.Template = [HTMLPicture("pic1") = "c:\exontrol\images\zipdisk.gif"] // oToolTip.HTMLPicture("pic1") = "c:\exontrol\images\zipdisk.gif"
oToolTip.ShowToolTip("<c><img>pic1</img><br>This is a bit of tooltip with a picture attached.")
XBasic (Alpha Five)
Dim oToolTip as P
oToolTip = OLE.Create("Exontrol.ToolTip.1")
oToolTip.Template = "HTMLPicture(`pic1`) = `c:\exontrol\images\zipdisk.gif`" // oToolTip.HTMLPicture("pic1") = "c:\exontrol\images\zipdisk.gif"
oToolTip.ShowToolTip("<c><img>pic1</img><br>This is a bit of tooltip with a picture attached.")
Visual Objects
oDCOCX_Exontrol1 := IToolTip{"Exontrol.ToolTip.1"}
oDCOCX_Exontrol1:[HTMLPicture,"pic1"] := "c:\exontrol\images\zipdisk.gif"
oDCOCX_Exontrol1:ShowToolTip("<c><img>pic1</img><br>This is a bit of tooltip with a picture attached.",nil,nil,nil,nil)
PowerBuilder
OleObject oToolTip
oToolTip = CREATE OLEObject
oToolTip.ConnectToNewObject("Exontrol.ToolTip.1")
oToolTip.HTMLPicture("pic1","c:\exontrol\images\zipdisk.gif")
oToolTip.ShowToolTip("<c><img>pic1</img><br>This is a bit of tooltip with a picture attached.")
Visual DataFlex
Procedure OnCreate
Forward Send OnCreate
Variant oComToolTip1
Get ComCreateObject "Exontrol.ToolTip.1" to oComToolTip1
Set ComHTMLPicture "pic1" to "c:\exontrol\images\zipdisk.gif"
Send ComShowToolTip "<c><img>pic1</img><br>This is a bit of tooltip with a picture attached." Nothing Nothing Nothing Nothing
End_Procedure
XBase++
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oToolTip
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oToolTip := XbpActiveXControl():new( oForm:drawingArea )
oToolTip:CLSID := "Exontrol.ToolTip.1" /*{D3973403-2857-44B5-8031-D2C5BF4005E6}*/
oToolTip:create(,, {10,60},{610,370} )
oToolTip:SetProperty("HTMLPicture","pic1","c:\exontrol\images\zipdisk.gif")
oToolTip:ShowToolTip("<c><img>pic1</img><br>This is a bit of tooltip with a picture attached.")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN