Don't know if this will help in your case, but this is the way I
did the mouse and events in a program a while back. The mouse and
events are handled apart. This is not all the code, just a rough
example. It worked. As for the other problem, I have no idea.
GetEvent
`---parse mouseclick-------
If Eventtype()=MOUSE_CLICK
Gosub _Parse_Mouse_Click
GetEvent
mouse=1
Endif
`select work project
if eventsource()=cmProject and mouse=1
mouse=0
Project$=itemtext(cmProject,selecteditem(cmProject))
if Project$=""
Project$="Default"
endif
cd Current$
if file exist("BoxShot.cfg")
delete file "BoxShot.cfg"
endif
open to write 1,"BoxShot.cfg"
write string 1,Project$
close file 1
if Project$="Default"
goto Out1
endif
Sync
Loop
`subroutine for mouse
_Parse_Mouse_Click:
`---select tab
if eventsource()=tbMain
setgadgetvisible pnTab0,0
setgadgetvisible pnTab1,0
cTab=selectedtab(tbMain)
select cTab
case 0
setgadgetvisible pnTab0,1
endcase
case 1
setgadgetvisible pnTab1,1
endcase
endselect
endif
Return
-JerBil
Ad Astra Per Asper