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. C#
  4. Closing a form and enable another one!

Closing a form and enable another one!

Scheduled Pinned Locked Moved C#
question
3 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.
  • A Offline
    A Offline
    alee15 10 88
    wrote on last edited by
    #1

    Hi, I am making a program and in the menu bar I did a menu bar item called About. Now I would like that when I open the About form the main form will be disabled. I did that and it worked. But now how should I make it enabled again after I close the About form? Thanks a lot

    N 1 Reply Last reply
    0
    • A alee15 10 88

      Hi, I am making a program and in the menu bar I did a menu bar item called About. Now I would like that when I open the About form the main form will be disabled. I did that and it worked. But now how should I make it enabled again after I close the About form? Thanks a lot

      N Offline
      N Offline
      Nicholas Butler
      wrote on last edited by
      #2

      Hi, You want to display your about form as a modal dialog:

      private void menuItemHelpAbout_Click(object sender, System.EventArgs e)
      {
      FormAbout dlg = new FormAbout();
      dlg.ShowDialog();
      }

      This will "disable" your main form while the about box is shown. ---------------------------- Be excellent to each other :)

      A 1 Reply Last reply
      0
      • N Nicholas Butler

        Hi, You want to display your about form as a modal dialog:

        private void menuItemHelpAbout_Click(object sender, System.EventArgs e)
        {
        FormAbout dlg = new FormAbout();
        dlg.ShowDialog();
        }

        This will "disable" your main form while the about box is shown. ---------------------------- Be excellent to each other :)

        A Offline
        A Offline
        alee15 10 88
        wrote on last edited by
        #3

        I don't think you understood me. I disabled the form but I would like that when I close the About form, the main form will be enabled again. How can I do that? thanks

        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