>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 >>