07-25-2005, 10:13 PM
You cannot unload type libraries. A type library is loaded when compiling the macro (when you start the macro, or only compile) first time in QM session, and unloaded when QM session ends. Here "QM session" is time while that QM macro list file is loaded.
To make the popup menu available, at first compile the macro (menu Tools -> Run -> Compile).
Maybe thread exits too soon. Try to add some delay, 1 or several seconds. Some ActiveX controls are not designed to run in multiple threads. When you run the macro multiple times, it actually runs in multiple different threads. To make the thread running all time, you for exampe can create a dialog that runs all time, and place the code in the dialog procedure, on button click for example.
To make the popup menu available, at first compile the macro (menu Tools -> Run -> Compile).
Maybe thread exits too soon. Try to add some delay, 1 or several seconds. Some ActiveX controls are not designed to run in multiple threads. When you run the macro multiple times, it actually runs in multiple different threads. To make the thread running all time, you for exampe can create a dialog that runs all time, and place the code in the dialog procedure, on button click for example.