forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Catch mouse double-click?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Sat Mar 15, 2003 6:52 pm    Post subject: Catch mouse double-click? Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Mar 15, 2003 6:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Sat Mar 15, 2003 7:16 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Mar 15, 2003 7:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Mar 15, 2003 7:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Sat Mar 15, 2003 8:07 pm    Post subject: Reply with quote

That worked great. Thanks Skit Smile
_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
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

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group