Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

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

SRP Computer Solutions, Inc.


At 25 NOV 2002 07:47PM Peter Walter wrote:

Don,

Thank you very much.

Peter

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/600156578564d7b885256c7a0015968c.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1