Page 22 - Open Soource Technologies 304.indd
P. 22
Event Driven Programming
Figure 2.4: ActiveX-4; Project Menu that Used for Adding a New Module.
Refer to appendix-A for code to be included in Class Module.
Refer to appendix-B for code to be included in Form.
Refer to appendix-C for code to be included in Standard Module.
Use ctrl-F5 to compile and make sure that there are no compilation errors.
From the file menu select Make Activex_ex.exe to make an exe file of this project (which is called
reference executable) as shown below:
Single-Threaded ActiveX Controls Cause Problems in Multithreaded Clients
If a client application is multithreaded; a single-threaded ActiveX control can
cause problems for the multithreaded client. In fact, if a multithreaded client
application is being written in VB, VB will not even allow programmers to
use a single-threaded ActiveX control in the project.
16 LOVELY PROFESSIONAL UNIVERSITY