Results 1 to 8 of 8

Thread: [2005] Trust me...I looked...Issue with program shutdown

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2006
    Posts
    7

    [2005] Trust me...I looked...Issue with program shutdown

    Im coding a simple program to assist in the job functions at my workplace. So far so good. No problems except, Its not shutting down unless its on the Startup Form. I've changed in the properties to be either "Shutdown on Startup form" and to "Shutdown on last form"

    How do I get this to shutdown no matter WHEN they hit the X in the top right?

  2. #2
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    Re: [2005] Trust me...I looked...Issue with program shutdown

    Looking at your previous post the reason is that the forms are not actually closing. You are just hiding the forms. So when you set the project property to Shutdown on Startup form, only when the first form is closed will it shut down. When you set it to last form, it is waiting for all those hidden forms to close. If you are just hiding the forms, then in each form's Closed event add this line of code, and it should work
    VB Code:
    1. Application.Exit
    Visual Studio Team Edition 2005
    GDI+ Links: Bob Powell VB.Net Heaven
    API Links: All API Pinvoke.Net
    VB6 to VB.Net: Visual Basic 6 to .NET Function Equivalents (Thread)

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2006
    Posts
    7

    Re: [2005] Trust me...I looked...Issue with program shutdown

    Sorry to sound so new...But I also cant find anything about closed events anywhere...How do I locate that? Im using VB Express btw.

    Thanks!

  4. #4
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,547

    Re: [2005] Trust me...I looked...Issue with program shutdown

    Quote Originally Posted by mitchelk
    Sorry to sound so new...But I also cant find anything about closed events anywhere...How do I locate that? Im using VB Express btw.

    Thanks!

    form_closing

    and

    form_closed

  5. #5
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    Re: [2005] Trust me...I looked...Issue with program shutdown

    In the coding window there are to comboboxes at the top. The left one you select the control, in this case it will be formevents. In the right one it lists all the events for that control. Select either Closed or CLosing. Untitled is the left combobox, untitled1 is the right combobox.
    Visual Studio Team Edition 2005
    GDI+ Links: Bob Powell VB.Net Heaven
    API Links: All API Pinvoke.Net
    VB6 to VB.Net: Visual Basic 6 to .NET Function Equivalents (Thread)

  6. #6

    Thread Starter
    New Member
    Join Date
    Jun 2006
    Posts
    7

    Re: [2005] Trust me...I looked...Issue with program shutdown

    Heh, I feel stupid. I actually just changed me.hide to me.close

    Works like a charm. Also, quick question, how to I get a linklabel to link out to a browser webpage?

  7. #7
    Hyperactive Member sheikh78's Avatar
    Join Date
    Apr 2006
    Location
    C:/
    Posts
    423

    Re: [2005] Trust me...I looked...Issue with program shutdown

    Well for the event handler for the click event of the link label just have it say

    VB Code:
    1. Process.start("http://www.google.com")

    Or whatever URL you need.
    "Imagination is more important than knowledge" - Albert Einstein, born on March 14th 1879.
    Can't find it here on VBForums? Go to the CodeProject. MSDN is your friend . I have such a bad website, my friend decided it would be funny to change the template and he moderates the site for me: visit my site!

    "Thinking of you, wherever you are
    We pray for our sorrows to end, and hope that our hearts will blend.
    Now I will step forward to realize this wish.
    And who knows, starting a new journey may not be so hard…
    Or maybe it has already begun.
    There are many worlds, but they share the same sky
    one sky, one destiny..."

  8. #8

    Thread Starter
    New Member
    Join Date
    Jun 2006
    Posts
    7

    Re: [2005] Trust me...I looked...Issue with program shutdown

    Thanks.

    Everyone has been a huge help!

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