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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Hide Form

Hide Form

Scheduled Pinned Locked Moved C#
questionhelp
7 Posts 3 Posters 1 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.
  • S Offline
    S Offline
    spif2001
    wrote on last edited by
    #1

    Hi I have an app, which main form at startup isn't shown. It is minimized, it is not shown in the taskbar and the app present itself via a systray icon. If u whant to see the Form, you click on the systray icon and I maximize the Form. The problem is, that I get a small form bar in the lower left corner of the screen, when my app is minimized and I don't whant that, since I got my systray icon to remaximize it with. How do I remove that annoying bar? I tried setting the Opacity property and that actually worked. Great! Here I need to point out, that the app is a Support app, which our support division can use when using Remote Desktop on our customers PCs. I therefore tried using Remote Desktop and to my surprise the app whent invisible! :omg: I could not maximize it anymore. After some debugging I discovered that the Opacity property caused that!?! :confused: So if any of you have a solution other than using the Opacity property I would greatly appreciate it. TIA -spif2001 I'm in the high-fidelity first class traveling set. And I think I need a Lear jet.

    G R 2 Replies Last reply
    0
    • S spif2001

      Hi I have an app, which main form at startup isn't shown. It is minimized, it is not shown in the taskbar and the app present itself via a systray icon. If u whant to see the Form, you click on the systray icon and I maximize the Form. The problem is, that I get a small form bar in the lower left corner of the screen, when my app is minimized and I don't whant that, since I got my systray icon to remaximize it with. How do I remove that annoying bar? I tried setting the Opacity property and that actually worked. Great! Here I need to point out, that the app is a Support app, which our support division can use when using Remote Desktop on our customers PCs. I therefore tried using Remote Desktop and to my surprise the app whent invisible! :omg: I could not maximize it anymore. After some debugging I discovered that the Opacity property caused that!?! :confused: So if any of you have a solution other than using the Opacity property I would greatly appreciate it. TIA -spif2001 I'm in the high-fidelity first class traveling set. And I think I need a Lear jet.

      G Offline
      G Offline
      Gavin Jeffrey
      wrote on last edited by
      #2

      Have you tried - form.Size = new Size(0,0); ?

      S 1 Reply Last reply
      0
      • G Gavin Jeffrey

        Have you tried - form.Size = new Size(0,0); ?

        S Offline
        S Offline
        spif2001
        wrote on last edited by
        #3

        the bar still shows af resizing I'm in the high-fidelity first class traveling set. And I think I need a Lear jet.

        1 Reply Last reply
        0
        • S spif2001

          Hi I have an app, which main form at startup isn't shown. It is minimized, it is not shown in the taskbar and the app present itself via a systray icon. If u whant to see the Form, you click on the systray icon and I maximize the Form. The problem is, that I get a small form bar in the lower left corner of the screen, when my app is minimized and I don't whant that, since I got my systray icon to remaximize it with. How do I remove that annoying bar? I tried setting the Opacity property and that actually worked. Great! Here I need to point out, that the app is a Support app, which our support division can use when using Remote Desktop on our customers PCs. I therefore tried using Remote Desktop and to my surprise the app whent invisible! :omg: I could not maximize it anymore. After some debugging I discovered that the Opacity property caused that!?! :confused: So if any of you have a solution other than using the Opacity property I would greatly appreciate it. TIA -spif2001 I'm in the high-fidelity first class traveling set. And I think I need a Lear jet.

          R Offline
          R Offline
          Robert Rohde
          wrote on last edited by
          #4

          Try setting the FormBorderStyle property of the form to FormBorderStyle.None.

          S 1 Reply Last reply
          0
          • R Robert Rohde

            Try setting the FormBorderStyle property of the form to FormBorderStyle.None.

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

            hmmm - that works when my app starts, but when I Maximize it and the Minimize it again, the Form bar reappears... :confused: I'm in the high-fidelity first class traveling set. And I think I need a Lear jet.

            R 1 Reply Last reply
            0
            • S spif2001

              hmmm - that works when my app starts, but when I Maximize it and the Minimize it again, the Form bar reappears... :confused: I'm in the high-fidelity first class traveling set. And I think I need a Lear jet.

              R Offline
              R Offline
              Robert Rohde
              wrote on last edited by
              #6

              It just came to my mind that you could instead of minimizing the form and trying to hide the bar just make the whole form invisible (form.Visible = false;).

              S 1 Reply Last reply
              0
              • R Robert Rohde

                It just came to my mind that you could instead of minimizing the form and trying to hide the bar just make the whole form invisible (form.Visible = false;).

                S Offline
                S Offline
                spif2001
                wrote on last edited by
                #7

                I tried that too :) to no avail. And I got it working using Hide(), except at startup. I tried to Hide() it in another thread like this: public MainForm() { InitializeComponent(); Thread t = new Thread(new ThreadStart(HideFunc)); t.Start(); }//constructor private void HideFunc() { Thread.Sleep(1); this.Hide(); } It works (even though the Form flickers before hiding). If I remove the Sleep(1) call the Form whont hide!? Am I missing some fundamental programming issue here or what? I'm in the high-fidelity first class traveling set. And I think I need a Lear jet.

                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