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. Control box question

Control box question

Scheduled Pinned Locked Moved Visual Basic
4 Posts 2 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.
  • H Offline
    H Offline
    harveyhanson
    wrote on last edited by
    #1

    OK, last question of the night. Is there any way, so when the close button is pressed in the control box, that either: a) A form is displayed (i have made a confirm exit screen) or b) The program is closed totally, including all hidden forms

    M 1 Reply Last reply
    0
    • H harveyhanson

      OK, last question of the night. Is there any way, so when the close button is pressed in the control box, that either: a) A form is displayed (i have made a confirm exit screen) or b) The program is closed totally, including all hidden forms

      M Offline
      M Offline
      M Hall
      wrote on last edited by
      #2

      Try the form.closing event.

      H 1 Reply Last reply
      0
      • M M Hall

        Try the form.closing event.

        H Offline
        H Offline
        harveyhanson
        wrote on last edited by
        #3

        I mean the close, minimise, maximise box. I want to try and interact with those actions, is this possible?? If form.close is correct, where would i put this code, isnt this just a command, for example on an event?

        M 1 Reply Last reply
        0
        • H harveyhanson

          I mean the close, minimise, maximise box. I want to try and interact with those actions, is this possible?? If form.close is correct, where would i put this code, isnt this just a command, for example on an event?

          M Offline
          M Offline
          M Hall
          wrote on last edited by
          #4

          There is a form closing event that gets called whenever the form is closed. You can do what ever cleanup you need, or even cancel the form close in it. http://msdn2.microsoft.com/en-us/library/system.windows.forms.form.closing.aspx[^]

          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