ShowHint

Top  Previous  Next

Prototype

 

intFormHandle:=ShowHint (intLeft, intTop, intWidth, intHeight, strText, intTimeOut)

 

Description

 

It shows a message with an advice, a sort of electronic post-it(r).

 

Parameters

 

intLeft: integer that represents the horizontal position where the top left corner will be shown.

 

intTop: integer that represents the vertical where the top left corner of the message will be shown.

 

intWidth: integer that represents the message width.

 

intHeight: integer that represents the message height.

 

strText: characters string representing the message text.

 

intTimeOut: integer that represents time of permanence of the message on the screen.

 

Returned value

 

intFormHandle: integer that represents the window handle of the message.

 

Notes

 

The coordinates and the windows size are in pixel. Time of permanence of the message is in thousandths of seconds: if it is set at 0, message will not be deleted automatically, but the user could delete it clicking two times on the mouse; if it is  -1, message will not be deleted neither automatically nor by the user, but it could be deleted only by the script using the FormClose command with the returned handle.

 

Example

 

// It shows a message self-deleting

ShowHint(100,100,200,200,'Message visible for five second ...',5000);

 

// It shows a message that could be deleted by the user

ShowHint(100,300,250,100,'Double click in order to delete this message...',0);

 

// It shows a permanent message

UnMessaggio:=ShowHint(200,400,150,150,'Attention, current elaboration !',-1);

 

// It initializes a variable

Counter:=0;

 

// It starts a cycle

Repeat

 

//It increases the variable

Inc(Counter);

 

//It checks whether the cycle has been executed for 10000 times and in affermative case, //it exit

Until (Counter>10000);

 

// It deletes message

FormClose(UnMessaggio);