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. Set current form to hide [modified]

Set current form to hide [modified]

Scheduled Pinned Locked Moved C#
question
8 Posts 5 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.
  • N Offline
    N Offline
    nuttynibbles
    wrote on last edited by
    #1

    Hi, I open and hide form using form.showdialog() and form.hide(); How do i detect if the current form is hidden, and if it's hidden don't do this.

    modified on Sunday, February 7, 2010 8:41 AM

    OriginalGriffO X 2 Replies Last reply
    0
    • N nuttynibbles

      Hi, I open and hide form using form.showdialog() and form.hide(); How do i detect if the current form is hidden, and if it's hidden don't do this.

      modified on Sunday, February 7, 2010 8:41 AM

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      To hide the form use the Form.Hide method. To show it again use Form.Show Simple, no?

      If Barbie is so popular, why do you have to buy her friends? Eagles may soar, but weasels don't get sucked into jet engines. If at first you don't succeed, destroy all evidence that you tried.

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      N 1 Reply Last reply
      0
      • OriginalGriffO OriginalGriff

        To hide the form use the Form.Hide method. To show it again use Form.Show Simple, no?

        If Barbie is so popular, why do you have to buy her friends? Eagles may soar, but weasels don't get sucked into jet engines. If at first you don't succeed, destroy all evidence that you tried.

        N Offline
        N Offline
        nuttynibbles
        wrote on last edited by
        #3

        hey OriginalGriff, Tks for the reply. i have edited my question to make it more clear. I open and hide my form using form.show and form.hide how do i check if the current form is hidden so as not to perform certain task

        L S 2 Replies Last reply
        0
        • N nuttynibbles

          hey OriginalGriff, Tks for the reply. i have edited my question to make it more clear. I open and hide my form using form.show and form.hide how do i check if the current form is hidden so as not to perform certain task

          L Offline
          L Offline
          Lutoslaw
          wrote on last edited by
          #4

          The property form.Visible determines whether a form is visible (shown).

          Greetings - Jacek

          N 1 Reply Last reply
          0
          • N nuttynibbles

            hey OriginalGriff, Tks for the reply. i have edited my question to make it more clear. I open and hide my form using form.show and form.hide how do i check if the current form is hidden so as not to perform certain task

            S Offline
            S Offline
            sanforjackass
            wrote on last edited by
            #5

            you can put global bool var. and when you hide the form put it True else false (it is just an idea)

            N 1 Reply Last reply
            0
            • S sanforjackass

              you can put global bool var. and when you hide the form put it True else false (it is just an idea)

              N Offline
              N Offline
              nuttynibbles
              wrote on last edited by
              #6

              Tks. alternative idea for visible method.

              1 Reply Last reply
              0
              • L Lutoslaw

                The property form.Visible determines whether a form is visible (shown).

                Greetings - Jacek

                N Offline
                N Offline
                nuttynibbles
                wrote on last edited by
                #7

                Great. It works. tks Jacek

                1 Reply Last reply
                0
                • N nuttynibbles

                  Hi, I open and hide form using form.showdialog() and form.hide(); How do i detect if the current form is hidden, and if it's hidden don't do this.

                  modified on Sunday, February 7, 2010 8:41 AM

                  X Offline
                  X Offline
                  xEvOx
                  wrote on last edited by
                  #8

                  this how i hide a form and open a new one

                  Form1 form = new Form1(); // new Form
                  this.Visible = false; // The Current Showing Form Hides
                  if(form.ShowDialog() == DialogResult.OK) // Makes Form Show
                  {

                  }
                  this.Visible = true; / on close of the form you opened the one you started from shows

                  :)

                  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