devxlogo

Interform Communication

Interform Communication

Question:
I need to run a menu option from Form1 that actualy executes amenu option on Form2. What I have had to do is show Form2 and use SendKey to get to an options update. I do not like the fact that Form2 displays while this process is occuring. There is no way, because of the tables opened in Form2 that I can peform the operation from Form1.

Answer:
Try putting an invisible text box on the window you want to trigger. Whenever you put a piece of text in the text box, the Change event will fire, and you can interpret the message. It is a poor man’s message handler. One thing to remember if you do this: make sure you clear the text box after you get the message. Otherwise, if you put the same text in, the change event will not fire.

See also  Redefining Energy Management: Advanced Solutions for Modern Buildings
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist