Problems firing OMNIEVENT (OpenInsight 32-bit Specific)
At 22 NOV 2002 10:55:47PM Peter Walter wrote:
I have a MDI window containing a number of PUSHBMPS. On the CLICK event of each button, I would like to trigger the OMNIEVENT of the MDI window, passing the CtrlEntID and CtrlClassID of the button. Sees simple enough, but I have tried using a Quickevent, sending OMNIEVENT to MDIFRAME, and I have tried a script, trying both Send_Event and Post_Event. Nothing seems to work - the OMNIEVENT is never triggered. My script is three lines:
Declare Function Send_Event
Unused=Send_Event(CtrlEntID1,".","OMNIEVENT",CtrlEntID,CtrlClassID)
Return 0
What am I doing wrong?
Peter
At 23 NOV 2002 01:39AM Donald Bakke wrote:
Peter,
If you are using this code:
Declare Function Send_Event Unused=Send_Event(CtrlEntID1,".","OMNIEVENT",CtrlEntID,CtrlClassID) Return 0
Then CtrlEntID1,"." will give you the parent window of your button control, i.e. MDIACTIVE not MDIFRAME. You would want to do something like this:
Declare Function Send_Event
MDIFrame=Get_Property(@Window, "MDIFRAME")
Unused=Send_Event(MDIFrame,"OMNIEVENT",CtrlEntID,CtrlClassID)
Return 0
Alternatively you can use a QuickEvent (which I've tested in 4.12 and it works) by doing the following:
QuickEvent Options: General
Send Message to: Control/Window - @MDIFRAME
Message: EXECUTE
Parameters: whatever you want
Make sure that "Return value in" is blank in both comboboxes.
dbakke@srpcs.com
At 25 NOV 2002 07:47PM Peter Walter wrote:
Don,
Thank you very much.
Peter