Mouse problem
Posted: Thu Aug 05, 2004 5:53 pm
The code below doesn't work between the hash lines. I have checked the help files and I think I am doing it the way it says, but obviously I am missing something.
Can anybody help please?
Thanks
Alan
If Window_Form1()
quitForm1=0
Repeat
EventID=WaitWindowEvent()
Select EventID
Case #PB_Event_CloseWindow
If EventWindowID()=#Window_Form1
quitForm1=1
EndIf
Case #PB_Event_Gadget
Select EventGadgetID()
Case #Gadget_Form1_TrackBar3
etc etc etc
EndSelect
EndSelect
#####################################################
event=EventType()
Select event
Case #PB_EventType_LeftClick
Debug "found"
; draw
If StartDrawing(WindowOutput())
If InitMouse()
Plot(WindowMouseX(),WindowMouseY(),RGB(255,0,0))
StopDrawing()
EndIf
EndIf
EndSelect
######################################################
Until quitForm1=1
CloseWindow(#Window_Form1)
EndIf
End
Can anybody help please?
Thanks
Alan
If Window_Form1()
quitForm1=0
Repeat
EventID=WaitWindowEvent()
Select EventID
Case #PB_Event_CloseWindow
If EventWindowID()=#Window_Form1
quitForm1=1
EndIf
Case #PB_Event_Gadget
Select EventGadgetID()
Case #Gadget_Form1_TrackBar3
etc etc etc
EndSelect
EndSelect
#####################################################
event=EventType()
Select event
Case #PB_EventType_LeftClick
Debug "found"
; draw
If StartDrawing(WindowOutput())
If InitMouse()
Plot(WindowMouseX(),WindowMouseY(),RGB(255,0,0))
StopDrawing()
EndIf
EndIf
EndSelect
######################################################
Until quitForm1=1
CloseWindow(#Window_Form1)
EndIf
End