PUBLIC oform1
oform1=NEWOBJECT("form1")
oform1.Show
RETURN
DEFINE CLASS form1 AS form
DoCreate = .T.
Caption = "Form1"
Name = "Form1"
ADD OBJECT text1 AS textbox WITH ;
Height = 23, ;
Left = 24, ;
Top = 24, ;
Width = 100, ;
Name = "Text1"
ADD OBJECT command1 AS commandbutton WITH ;
Top = 180, ;
Left = 108, ;
Height = 27, ;
Width = 84, ;
Caption = "Click me!", ;
Name = "Command1"
PROCEDURE command1.Click
oTool=CREATEOBJECT("tooltip","This is the tooltip message...",thisform.text1.Top+thisform.text1.height+25,thisform.text1.Left+thisform.text1.Width)
oTool.show(1)
ENDPROC
ENDDEFINE
DEFINE CLASS tooltip AS form
Top = 0
Left = 0
Height = 30
Width = 312
DoCreate = .T.
BorderStyle = 0
Caption = "Form"
TitleBar = 0
AlwaysOnTop = .T.
BackColor = RGB(255,255,164)
Name = "tooltip"
ADD OBJECT shape1 AS shape WITH ;
Top = 0, ;
Left = 0, ;
Height = 29, ;
Width = 312, ;
BackStyle = 0, ;
Name = "Shape1"
ADD OBJECT timer1 AS timer WITH ;
Top = 12, ;
Left = 36, ;
Height = 23, ;
Width = 23, ;
Interval = 3000, ;
Name = "Timer1"
ADD OBJECT label1 AS label WITH ;
BackStyle = 0, ;
Caption = "Label1", ;
autosize = .t.,;
Height = 24, ;
Left = 3, ;
Top = 3, ;
Width = 313, ;
Name = "Label1"
PROCEDURE Init
LPARAMETERS cText,nTop,nLeft
this.label1.Caption = cText
this.top = nTop
this.Left = nLeft
ENDPROC
PROCEDURE timer1.Timer
thisform.Release()
ENDPROC
ENDDEFINE