Results 1 to 5 of 5

Thread: Simple stuff (quitting a VB app)

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    Brossard, Québec, Canada
    Posts
    241
    On my application's form load, my app will say that it's been in use for, let's say 30 days and will be shut down.

    But how can I do it? How do I simply TERMINATE the application? I tried exit sub but of course this won't terminate the application.

    Thanks.

  2. #2
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    to terminate the program all you have to to is write:






    Private Sub Command1_Click()
    End
    End Sub


    NXSupport - Your one-stop source for computer help

  3. #3
    Guest
    You mean to exit a program? Use the End command.

    Code:
    Private Sub Form_Load()
    
       End ' Exit the program
    
    End Sub

  4. #4
    Addicted Member
    Join Date
    Apr 2000
    Location
    Sheffield, England.
    Posts
    136
    Most people tend to think this is the better way of ending a program.

    Code:
    Private Sub CloseAllForms()
        Dim nForm As Form
        For Each nForm In Forms
            Unload nForm
        Next
    End Sub
    It unloads all forms, thus ending the program.
    Visual Basic 6 Enterprise Edition + SP4

  5. #5
    Lively Member
    Join Date
    Jun 2000
    Location
    Ca
    Posts
    93

    you can...

    If you want the exit button to be in an adden button put this in.
    Code:
    Private Sub Command1_Click() 
    unload me 'exits the program
    End Sub
    Or you can just add
    Code:
    unload me
    to anything you click on.
    Timbudtwo
    I have no life, only one with computers.

    VB 6.0 Enterprise Edition
    [hr]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width