home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / source / chap16 / dlgrun3 / modmain.bas < prev    next >
Encoding:
BASIC Source File  |  1995-07-13  |  489 b   |  17 lines

  1. Attribute VB_Name = "MainModule"
  2. Option Explicit
  3.  
  4. Sub Main()
  5.     'Check to see if the application has
  6.     'been launched by a curious user
  7.     If App.StartMode = vbSModeStandalone Then
  8.         Dim msg As String, style As Integer
  9.         msg = "This application can not be run " _
  10.             & "as a stand alone executable.  Sorry! " _
  11.             & "Exiting now."
  12.         style = vbOK + vbExclamation
  13.         MsgBox msg, style, "rbRun.exe"
  14.         'End
  15.     End If
  16. End Sub
  17.