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
Dim desc As String * VI_FIND_BUFLEN
Dim nList As Long
Dim ret As Long
Dim readin As String * 64
stat = viOpenDefaultRM(dfltRM)
If (stat < VI_SUCCESS) Then
186