PDA

View Full Version : Double Click on the Image object


Samio
04-04-2009, 12:16 PM
Hi All.
it is possible run a action when user click on the an image object
and run another action when double-click on the image.
for example exit program when click and minimize when double-click.:rolleyes

T3STY
04-05-2009, 04:55 PM
The image object has got just 'left-click' and 'right-click' events, so you can't use the double-click.

Bye!

Kick
04-05-2009, 06:49 PM
Hi All.
it is possible run a action when user click on the an image object
and run another action when double-click on the image.
for example exit program when click and minimize when double-click.:rolleyes
* On Preload:
--nDoubleClickTime = tonumber(DLL.CallFunction("user32.dll", "GetDoubleClickTime", "", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL));
nDoubleClickTime = 200;
nClick = 0;

* On Timer:
if (nClick == 2) then
nClick = 0;
Page.StopTimer();
Application.Minimize();
else
nClick = 0;
Page.StopTimer();
end

* On Click the object "Image1":
Page.StartTimer(nDoubleClickTime);
nClick = nClick + 1;