I have a modal form, and want to know if someone clicked anywhere but this
form.
Thanks
You probably cannot in a "clean" way, I think - the kludgy one using OKL
pasted below seems to work. Out of curiosity, why do you want to do so?
hth
-Stefan
* form_modal_click_elswhere.prg
CLEAR
LOCAL oForm as Form
oForm = CREATEOBJECT('TestForm')
oForm.Show(1)
RETURN
DEFINE CLASS TestForm as Form
AutoCenter = .T.
AllowOutput = .F.
PROCEDURE Activate()
ON KEY LABEL leftmouse ;
IIF( VARTYPE(_screen.ActiveForm)='O' AND
PEMSTATUS(_screen.ActiveForm,'MouseOutside',5), ;
_screen.ActiveForm.MouseOutside(), ;
.T. )
ENDPROC
PROCEDURE Destroy()
ON KEY LABEL leftmouse
ENDPROC
PROCEDURE MouseOutside()
lnCol = MCOL('',3)
lnRow = MROW('',3)
IF BETWEEN(m.lnCol, Thisform.Left,Thisform.Left+Thisform.Width) ;
AND BETWEEN(m.lnRow, Thisform.Top,Thisform.Top+Thisform.Height)
RETURN
ENDIF
? LOWER(PROGRAM())
ENDPROC
ENDDEFINE
* eop
--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------
And I want to detect if someone have clicked anywhere but form (mine combo),
so I know that combo has to be closed.
Sinisa
--
Message posted via DBMonster.com
http://www.dbmonster.com/Uwe/Forums.aspx/foxpro-grids/200901/1
That sounds reasonable, thanks for the feedback.
-Stefan
Stefan Wuebbe wrote:
>> First, thank you. I havent tried it jet.
>> Well, I have to make "combo" that has some functions that ordinary combo has
>[quoted text clipped - 4 lines]
>> And I want to detect if someone have clicked anywhere but form (mine combo),
>> so I know that combo has to be closed.
>
>That sounds reasonable, thanks for the feedback.
>
>-Stefan
--