Article | 41017049 |
Type | HowTo |
Product | Engine |
Version | 4.0.0.1017 |
Date Added | 3/31/2003 |
Submitted by | Kim Jong Woo - Neodreams Co., Ltd. |
Keywords |
Just sample code.
1. Create a Standard EXE project in Visual Basic. Form1 is created by default.
2. Add two CommandButtons (Command1 and Command2) and VDPro (VDPro1) to Form1.
3. Add the following code to the form.
4. Run the application.
5. Click the Command1 CommandButton.
6. Click the Command2 CommandButton.
7. And, you met the Error Message.
Private Sub Command1_Click()
VDPro1.CommandAction.Pan
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Please let me know how to solve it.
Before the Unload Me command you should check if a command is active or user input is needed (like in Pan). This check can be done with OpenLoops property and/or JobLoop Event. Before the destroy of the form you have to cancel these with Cancel Sub, Cancel1 Sub or inside the JobLoop event handler.