| View previous topic :: View next topic |
| Author |
Message |
GeoTrail Valued Contributor


Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Sat Mar 15, 2003 6:52 pm Post subject: Catch mouse double-click? |
|
|
I'm adding a taskicon to my program and I want the dialog to show when the user double clicks the taskbar icon.
How can I do that?
I know how to catch left, middle and right clicks using the @click function but not how to use a double click feature. _________________
 |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sat Mar 15, 2003 6:59 pm Post subject: |
|
|
You can use this. Rename the TaskiconCLICK text to the real name of your taskicon...
| Code: | :TaskiconCLICK
wait event,1
%%event = @event()
if @not(@equal(%%event,TaskiconCLICK))
goto Evloop
end
rem Program code to run
goto Evloop |
|
|
| Back to top |
|
 |
GeoTrail Valued Contributor


Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Sat Mar 15, 2003 7:16 pm Post subject: |
|
|
I couldn't make it work. | Code: | :ShowDialog
DIALOG CREATE,New Dialog,-1,0,240,160
DIALOG ADD,BUTTON,BUTTON1,12,8,64,24,BUTTON1
DIALOG ADD,BUTTON,BUTTON2,75,8,64,24,Taskicon
DIALOG ADD,EDIT,EDIT1,46,12,180,19,EDIT1
DIALOG ADD,TASKICON,TaIcon,,Experiment
:Evloop
wait event
goto @event()
:TaIconCLICK
If @equal(@click(B),LEFT)
wait event,1
%%event = @event()
if @not(@equal(%%event,TaIconCLICK))
goto Evloop
End
Goto ShowDialog
Else
dialog popup,Show Dialog|Exit
End
goto Evloop
rem If @equal(@click(B),LEFT)
rem Else
rem dialog popup,Show Dialog|Exit
rem End
rem goto Evloop
:BUTTON1BUTTON
goto Close
:Show DialogMENU
DIALOG SHOW
goto Evloop
:BUTTON2BUTTON
DIALOG HIDE
goto Evloop
:ExitMENU
:Close
exit |
When the user rightclick, he will see the popupmenu, when he clicks, nothing, but when double clicking he is supposed to see the dialog.
Could you help me please Skit 3000? _________________

Last edited by GeoTrail on Sat Mar 15, 2003 7:46 pm; edited 1 time in total |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sat Mar 15, 2003 7:37 pm Post subject: |
|
|
You forgot to change the %%event variable...
| Code: |
:TaIconCLICK
If @equal(@click(B),LEFT)
wait event,1
%%event = @event()
if @not(@equal(%%event,TaIconCLICK))
goto Evloop
End
Goto ShowDialog
Else
dialog popup,Show Dialog|Exit
End
goto Evloop |
|
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sat Mar 15, 2003 7:51 pm Post subject: |
|
|
Didn't saw the whole code... Here is a remake.
| Code: | DIALOG CREATE,New Dialog,-1,0,240,160
DIALOG ADD,BUTTON,BUTTON1,12,8,64,24,BUTTON1
DIALOG ADD,BUTTON,BUTTON2,75,8,64,24,Taskicon
DIALOG ADD,EDIT,EDIT1,46,12,180,19,EDIT1
DIALOG ADD,TASKICON,TaIcon,,Experiment
:Evloop
wait event
goto @event()
:TaIconCLICK
If @equal(@click(B),LEFT)
wait event,1
%%event = @event()
if @not(@equal(%%event,TaIconCLICK))
goto Evloop
End
dialog show
Else
dialog popup,Show Dialog|Exit
End
goto Evloop
:BUTTON1BUTTON
goto Close
:Show DialogMENU
DIALOG SHOW
goto Evloop
:BUTTON2BUTTON
DIALOG HIDE
goto Evloop
:ExitMENU
Exit
:Close
dialog hide
goto Evloop |
|
|
| Back to top |
|
 |
GeoTrail Valued Contributor


Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Sat Mar 15, 2003 8:07 pm Post subject: |
|
|
That worked great. Thanks Skit  _________________
 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|