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. Display App in taskbar when visible = false

Display App in taskbar when visible = false

Scheduled Pinned Locked Moved C#
help
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.
  • T Offline
    T Offline
    talk2robert
    wrote on last edited by
    #1

    Hello All, I have a rather strange app that I want to keep visible in the taskbar at all times, even when the app is set to visible = false. Thanks in advance for your time and help.

    M 1 Reply Last reply
    0
    • T talk2robert

      Hello All, I have a rather strange app that I want to keep visible in the taskbar at all times, even when the app is set to visible = false. Thanks in advance for your time and help.

      M Offline
      M Offline
      Muhammad Qasim Pasta
      wrote on last edited by
      #2

      you can achieve it by overriding OnVisibleChanged. In overrided method, you can force to minimize whenever set visible to false protected override void OnVisibleChanged(EventArgs e) { if(this.Visible == false) { this.Visible = true; this.WindowState = FormWindowState.Minimized; } else base.OnVisibleChanged(e); }

      M 1 Reply Last reply
      0
      • M Muhammad Qasim Pasta

        you can achieve it by overriding OnVisibleChanged. In overrided method, you can force to minimize whenever set visible to false protected override void OnVisibleChanged(EventArgs e) { if(this.Visible == false) { this.Visible = true; this.WindowState = FormWindowState.Minimized; } else base.OnVisibleChanged(e); }

        M Offline
        M Offline
        Muhammad Qasim Pasta
        wrote on last edited by
        #3

        A bit modification for my last reply ... you can achieve by VisibleChanged Event of form too!!! private void Form2_VisibleChanged(object sender, EventArgs e) { if(this.Visible == false) { this.Visible = true; this.WindowState = FormWindowState.Minimized; } }

        T 1 Reply Last reply
        0
        • M Muhammad Qasim Pasta

          A bit modification for my last reply ... you can achieve by VisibleChanged Event of form too!!! private void Form2_VisibleChanged(object sender, EventArgs e) { if(this.Visible == false) { this.Visible = true; this.WindowState = FormWindowState.Minimized; } }

          T Offline
          T Offline
          talk2robert
          wrote on last edited by
          #4

          Thanks MqPasta, I've put it into my app and it did the job. Thanks once more for your time, Robert

          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