Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can a mouse click be detected outside of a modal form
Message
From
27/10/2006 08:52:51
Mike Sue-Ping
Cambridge, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01164759
Message ID:
01164966
Views:
15
Thanks Ben. I'll give it a try.

>Hi Mike,
>
>Please see if this is what you want:
>
>oFrm1=CreateObject('Form1')
>oFrm1.Show(1)
>Define Class form1 As Form
>	AutoCenter=.T.
>	Id=''
>	Add Object Cmd1 As CommandButton With Caption='Launch Modal Form',Width=240,Height=60
>
>	Procedure Cmd1.Click
>	Store Sys(3) To cID,Thisform.Id && Difference instances will have different IDs
>	On Key Label Mouse Do MouseTrap With &cID
>	oFrm2=CreateObject('Form')
>	oFrm2.Show(1)
>	On Key Label Mouse
>	Endproc
>EndDefine
>
>Function MouseTrap
>Lparameters nID
>oObj=Sys(1270)
>Do While Type('oObj.Parent')='O'
>	oObj=oObj.Parent
>EndDo
>If Type('oObj.ID')='C' And Val(oObj.Id)=nID
>	? 'Clicked on mother form'
>EndIf
>
>
>Ben
>
>
>>I have a modal form that I show when a button is selected on another form. Is there any way to determine when a user has clicked on the underlying form (the one that contains the button that launched the modal form)?
>>
>>TIA
>>Mike
Previous
Reply
Map
View

Click here to load this message in the networking platform