Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Why does the process not end?

Why does the process not end?

Scheduled Pinned Locked Moved Visual Basic
questionhelp
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Fredrik Skog
    wrote on last edited by
    #1

    I have this VB app. When I use my exit-button to close it down everything is fine, but when I use the X-button in the top right corner, the window disappears, but leaves a process running. How do I fix this? Cheers, Fredrik
    "Felix qui potuit rerum cognoscere causas."

    R 1 Reply Last reply
    0
    • F Fredrik Skog

      I have this VB app. When I use my exit-button to close it down everything is fine, but when I use the X-button in the top right corner, the window disappears, but leaves a process running. How do I fix this? Cheers, Fredrik
      "Felix qui potuit rerum cognoscere causas."

      R Offline
      R Offline
      Ray Cassick
      wrote on last edited by
      #2

      Sounds to me like you might have one of the following: 1 - A form that is hidden but not unloaded (there is a difference). 2 - An object variable that has not been set = to Nothing when you are done with it. Paul Watson wrote: At the end of the day it is what you produce that counts, not how many doctorates you have on the wall.

      F 1 Reply Last reply
      0
      • R Ray Cassick

        Sounds to me like you might have one of the following: 1 - A form that is hidden but not unloaded (there is a difference). 2 - An object variable that has not been set = to Nothing when you are done with it. Paul Watson wrote: At the end of the day it is what you produce that counts, not how many doctorates you have on the wall.

        F Offline
        F Offline
        Fredrik Skog
        wrote on last edited by
        #3

        Ah, there is a form that is hidden (frmComSelect in the code below). But how do I close it? I have a hard time finding anything useful in MSDN. The app is designed like this: First a window is displayed prompting the user to make a selection. Thereafter, the main window is displayed. Private Sub Command1_Click() If (optCom1(0).Value = True) Then PortNum = 1 ElseIf (optCom1(1).Value = True) Then PortNum = 2 ElseIf (optCom1(2).Value = True) Then PortNum = 3 ElseIf (optCom1(3).Value = True) Then PortNum = 4 End If If (Adapter(0).Value = True) Then PortType = 1 ElseIf (Adapter(1).Value = True) Then PortType = 5 End If frmComSelect.Hide frmMain.Show Main End Sub Cheers, Fredrik
        "Felix qui potuit rerum cognoscere causas."

        D 1 Reply Last reply
        0
        • F Fredrik Skog

          Ah, there is a form that is hidden (frmComSelect in the code below). But how do I close it? I have a hard time finding anything useful in MSDN. The app is designed like this: First a window is displayed prompting the user to make a selection. Thereafter, the main window is displayed. Private Sub Command1_Click() If (optCom1(0).Value = True) Then PortNum = 1 ElseIf (optCom1(1).Value = True) Then PortNum = 2 ElseIf (optCom1(2).Value = True) Then PortNum = 3 ElseIf (optCom1(3).Value = True) Then PortNum = 4 End If If (Adapter(0).Value = True) Then PortType = 1 ElseIf (Adapter(1).Value = True) Then PortType = 5 End If frmComSelect.Hide frmMain.Show Main End Sub Cheers, Fredrik
          "Felix qui potuit rerum cognoscere causas."

          D Offline
          D Offline
          David Stone
          wrote on last edited by
          #4

          You would use frmComSelect.Unload


          I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past. -Chris Maunder Microsoft has reinvented the wheel, this time they made it round. -Peterchen on VS.NET

          F 2 Replies Last reply
          0
          • D David Stone

            You would use frmComSelect.Unload


            I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past. -Chris Maunder Microsoft has reinvented the wheel, this time they made it round. -Peterchen on VS.NET

            F Offline
            F Offline
            Fredrik Skog
            wrote on last edited by
            #5

            The compiler does not like that. It says 'Method or data member not found' Do I have the wrong type of window? Cheers, Fredrik
            "Felix qui potuit rerum cognoscere causas."

            1 Reply Last reply
            0
            • D David Stone

              You would use frmComSelect.Unload


              I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past. -Chris Maunder Microsoft has reinvented the wheel, this time they made it round. -Peterchen on VS.NET

              F Offline
              F Offline
              Fredrik Skog
              wrote on last edited by
              #6

              Unload frmComSelect works fine. Thanks for the pointer. Cheers, Fredrik
              "Felix qui potuit rerum cognoscere causas."

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups