Page 1 of 1
Which command is the window version of the MouseButton() ?
Posted: Wed Aug 08, 2012 12:02 am
by Primoz128
What title says...
Re: Which command is the window version of the MouseButton()
Posted: Wed Aug 08, 2012 3:34 am
by rrpl
Do you mean for monitoring the mouse button in an window event loop?
Case #WM_LBUTTONDOWN :MessageRequester("Test Left Click","")
Case #WM_RBUTTONDOWN :MessageRequester("Test Right Click","")
Case #WM_MBUTTONDOWN :MessageRequester("Test Middle Click","")
Re: Which command is the window version of the MouseButton()
Posted: Wed Aug 08, 2012 11:23 am
by Primoz128
So your saying that window works on events ?
Re: Which command is the window version of the MouseButton()
Posted: Wed Aug 08, 2012 11:33 am
by Bisonte
The question is.... What do you want exactly ??
Re: Which command is the window version of the MouseButton()
Posted: Wed Aug 08, 2012 11:40 am
by rrpl
Bisonte wrote:The question is.... What do you want exactly ??
Yeah what he said!
An example of what I said;
Code: Select all
Procedure.s MouseLoc() ; a procedure to get mouse location in window
Protected.s LocText
x = WindowMouseX(0)
y = WindowMouseY(0)
LocText = "Mouse Located at X="+Str(x)+" Y="+Str(y)
ProcedureReturn LocText
EndProcedure
OpenWindow(0,0,0,550,350,"Basic Window Eventloop",#PB_Window_MinimizeGadget|#PB_Window_ScreenCentered)
Repeat
Select WaitWindowEvent():
Case #PB_Event_CloseWindow
End
Case #WM_LBUTTONDOWN :MessageRequester("Test Left Click",MouseLoc())
Case #WM_RBUTTONDOWN :MessageRequester("Test Right Click",MouseLoc())
Case #WM_MBUTTONDOWN :MessageRequester("Test Middle Click",MouseLoc())
EndSelect
ForEver
But is this what you are looking for?
Giving a example of the code you are trying to create will help people to know what you are looking for.
Re: Which command is the window version of the MouseButton()
Posted: Wed Aug 08, 2012 7:11 pm
by Primoz128
If i wanted more help, i would have said that.
Re: Which command is the window version of the MouseButton()
Posted: Wed Aug 08, 2012 7:16 pm
by Demivec
Primoz128 wrote:What title says...
EventType()
Re: Which command is the window version of the MouseButton()
Posted: Wed Aug 08, 2012 8:01 pm
by luis
Primoz128 wrote:If i wanted more help, i would have said that.
Priceless.
Oh what a day today.