;Capture mousedown and abort events
CallFunction (0,"VCSetAlertAppDll",@iError,"Test","DrawLine",ALERT_APP_UTOOL_MOUSEDOWN)
;User tool prompt
CallFunction (1,"VCSetUserTool",2,"DrawLine","Enter lower left corner")
CallFunction (1,"VCSetPrompt",1,"Enter lower right corner")
Repeat
WaitWindowEvent()
Event = EventType()
If Event = #PB_EventType_LeftClick
;Get 1st mouse down point
;CallFunction (0,"VCGetUserToolLBDown",@iError,StartLine())
MessageRequester("Test", "MouseClick1", 0)
Else
Delay(1) ; No event, let the others apps get some CPU time too !
EndIf
Until ToolState = 10
;Capture mousedown and abort events
CallFunction (0,"VCSetAlertAppDll",@iError,"Test","DrawLine",ALERT_APP_UTOOL_MOUSEDOWN)
;User tool prompt
CallFunction (1,"VCSetUserTool",2,"DrawLine","Enter lower left corner")
CallFunction (1,"VCSetPrompt",1,"Enter lower right corner")
OpenWindow(0,0,0,230,90,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"Event handling example...")
Repeat
Event = WaitWindowEvent()
; EventType() is only used with Gadgets...
; #PB_EventType_LeftClick is only used with Gadgets...
If Event = #WM_LBUTTONDOWN ;this is a WinAPI constant
;Get 1st mouse down point
;CallFunction (0,"VCGetUserToolLBDown",@iError,StartLine())
MessageRequester("Test", "MouseClick1", 0)
Else
Delay(1) ; No event, let the others apps get some CPU time too !
EndIf
Until EventID = #PB_Event_CloseWindow
; don't know what this should be -> Until ToolState = 10