To edit or create a script using Visual Studio for modal editing:
-
With a form open and in Design Mode, from the “”
menu, select “”.
If a form script is not defined for the current form, the editor
opens a template for a script. Otherwise, the editor opens the form
script for the form. The solution name is “EditWinStudioScript”.
The class name is “ScriptClass.VB”.
-
Edit the script code.
We recommend that you build the script. Visual Studio provides a
convenient environment for identifying and correcting errors. WinStudio itself does not
use the build.
-
Save the script.
-
Minimize or close the Visual Studio IDE.
-
Optionally, in the “Editing Script
in Visual Studio” dialog box, you can:
- Perform test compilations of the script: Click “Compile”,
and then observe the “Compile Status”
message, which indicates whether the compilation was successful.
- Reopen or restore the Visual Studio IDE to fix compilation
errors: Click “VS IDE”.
- Start a “debugging
session” to test script functionality with WinStudio.
-
To preserve the script in a cache and close the dialog box, click
“OK”.
注意:
If the “Compile source on OK” check
box is selected and compilation fails, the dialog box remains open and
“Compile Status” shows a failure message.
You can fix the compilation errors and click “OK”
again, or you can clear the check box and click “OK”
to preserve the script, including any faulty code.