|Home > Software > Interacting with ActiveX exe from Standard exe and vice versa|
ActiveX .EXE : A Beginner’s Guide
To demonstrate how the Standard EXE interacts with the ActiveX EXE, run the test project. Assuming that the code is entered properly, a form as shown below is displayed:
Fig: ActiveX-9; Test Form
Select either of the options on the form and click on “show form from ActiveX Exe” Button.
Fig. ActiveX-10; Test Form Selection
On selecting and clicking the button opens a form in AcxtivexEx Component as shown in below figure.
In this case, Alphabets Drop-Down box is disabled as “Choose Numbers in ActiveX Exe” has been selected.
Here a value is passed from Standard Exe to ActiveX Exe based on the option button we selected and its corresponding drop-down box is enabled in ActiveX.
Fig: ActiveX-11; ActiveX EXE call.
Select any number from the drop-down box (Numbers Drop-down box in this case) and click on “Select and close” Button
Fig: ActiveX-12; Here the Control is passed to the ActiveX EXE application.
On clicking the “Select and close” button the form in ActiveX Exe is closed, and the control is passed back to the Main (Standard EXE file). However, note that the ActiveX EXE is still running in the background. It is possible to close ActiveX EXE, if so desired. In our example, it would be closed only when the Main application is closed.
Now click on “Show Selected Value in ActiveX Exe” button to see the item that is selected in ActiveX Exe. Here the number/alphabet selected in ActiveX passed to Standard Exe.
Fig: ActiveX-13; Control is passed back to the Main (Standard EXE).
Below shows the item that was selected in ActiveX Exe.
Fig: ActiveX-14; The selected number is displayed in the Main (Standard EXE).
As you can see, in the above example, we have selected “numbers” in the Standard EXE, and later selected “2” in the ActiveX EXE. The number “2” is passed on to the Standard EXE upon request.
Note that this is only a brief example provided to demonstrate the concept. Practically, the ActiveX EXE/DLL could be quite large, such as a calculator. The calling program may be a Text Editor.
|Home Copyright © 2003-2018 TutorialsWeb.com Disclaimer Sitemap|