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. Exit button

Exit button

Scheduled Pinned Locked Moved Visual Basic
question
4 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.
  • D Offline
    D Offline
    Dave McCool
    wrote on last edited by
    #1

    I have a form and if you load another form from that, the first form gets hidden, but not closed, so, how can I get the whole application to close if the exit button on the top right corner of the program is cliced rather than the exit button I placed?

    In the end we're all just the same

    N 1 Reply Last reply
    0
    • D Dave McCool

      I have a form and if you load another form from that, the first form gets hidden, but not closed, so, how can I get the whole application to close if the exit button on the top right corner of the program is cliced rather than the exit button I placed?

      In the end we're all just the same

      N Offline
      N Offline
      nilam11
      wrote on last edited by
      #2

      hi to close the application use - application.close() & to close the current form simply use - me.close()

      Thanks bye

      D 1 Reply Last reply
      0
      • N nilam11

        hi to close the application use - application.close() & to close the current form simply use - me.close()

        Thanks bye

        D Offline
        D Offline
        Dave McCool
        wrote on last edited by
        #3

        But I used FrmFinance.hide () as I wanteded it that way because I had information I wanted to display on it temp while the application was open. If I put frmFinance.close () you would lose the information

        In the end we're all just the same

        T 1 Reply Last reply
        0
        • D Dave McCool

          But I used FrmFinance.hide () as I wanteded it that way because I had information I wanted to display on it temp while the application was open. If I put frmFinance.close () you would lose the information

          In the end we're all just the same

          T Offline
          T Offline
          Tom Deketelaere
          wrote on last edited by
          #4

          depends on what you want say you have 2 forms frm1 and frm2 frm2 is opened by clicking a button on frm1 then you can hide frm1 like you are doing without problems now from here it depends on what you want if you want both forms to close when the user presses the close button from frm2 you use application.close if you only want frm2 to close you use me.close (and bring frm1 back out of hiding) use the frm2.close event to do this hope it helps

          If my help was helpfull let me know, if not let me know why. The only way we learn is by making mistakes.

          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