EasyManua.ls Logo

Picotest M3500A - Page 177

Picotest M3500A
192 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
177
177177
177
How to: Change the Startup Object for an Application
The Startup Object property for a project defines the entry point to be
called when the application loads; generally this is set to either the main
form in your application or to the Sub Main procedure that should run
when the application starts. Since Class Libraries do not have an entry
point, their only option for this property is (None).
For Windows Applications projects, only forms or classes with a Public
Sub Main procedure are available as Startup objects unless you check
the Startup with custom Sub Main checkbox; when this option is checked,
you must add code in the Sub Main procedure for the form.
Note: When using a custom Sub Main procedure as the Startup object,
code in the Application events (Startup, Shutdown, Startup
Next
Instance, and Unhandled
Exception) is not executed
.
The Startup Object
property can be set in the Application pane of the Project Designer.
To change the startup object
1. With a project selected in Solution Explorer, on the Project menu
click Properties.
2. Select the Application pane.
3. Select a Startup object from the Startup object drop-down list.
To set the startup object for a Windows Application to Sub Main
1. With a project selected in Solution Explorer, on the Project menu
click Properties.
2. Select the Application pane.
3. Check the Startup with custom Sub Main checkbox.
4. Select Sub Main from the Startup object drop-down list.
LISTING C.1. MEASure.bas--THE Sub Main FUNCTION IS WHERE YOU
NEED TO ADD INITIALIZATION CODE.
Sub Main()
Dim stat As ViStatus
Dim dfltRM As ViSession
Dim sesn As ViSession
Dim fList As ViFindList

Table of Contents

Other manuals for Picotest M3500A

Related product manuals