CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Easy Question

  1. #1
    Join Date
    Oct 2001
    Location
    Atlanta
    Posts
    2

    Easy Question

    I am very new to VB and I have written a SQL-DMO app that has a GUI interface and a command line interface. I have created a SUB main and made it the startup. Here it is


    Sub Main()
    ' If there is a command line, then this is batch mode
    If Len(Command$()) Then
    ' Parse and run the command line
    RunCommand
    frmRun.Hide

    Else
    MainForm.Show
    End If
    End Sub

    Problem is after the frmRun.Hide, the form hides but the exe keeps running. What do I do?

    Thanks in advance



  2. #2
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: Easy Question

    >Problem is after the frmRun.Hide, the form hides but the exe keeps running.
    Do yopu mean program does not end? Matter is: hiding a form, make it invisible, but keep it loaded.
    To end your program, you have to unload all loaded forms
    ie:

    Unload frmRun

    'or
    dim frm as form
    for each frm in forms
    unload frm
    set frm = nothing
    next frm




    Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
    and all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

    The Rater
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

  3. #3
    Join Date
    Oct 2001
    Location
    Atlanta
    Posts
    2

    Re: Easy Question

    Thanks, that was it.

    Kenny


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

Featured