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. check if minimizebutton was clicked

check if minimizebutton was clicked

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

    Hy everyone! Could anyone of you tell me how to implement checking if the minimizebutton on my WindowsForm was clicked? I had a solution which worked but well when I switched over to another application to drag&drop some data the application was minimized as well and no longer shown in the taskbar. But what I want to do is: When switched to another application to drag&drop data the application only moves to the background but is still be shown in the taskbar. If the minimizebutton was clicked then my application should minimize and not be shown in the taskbar (except the icon to resize my application once again). Thanks! Stephan.

    S 1 Reply Last reply
    0
    • S Stephan Wright

      Hy everyone! Could anyone of you tell me how to implement checking if the minimizebutton on my WindowsForm was clicked? I had a solution which worked but well when I switched over to another application to drag&drop some data the application was minimized as well and no longer shown in the taskbar. But what I want to do is: When switched to another application to drag&drop data the application only moves to the background but is still be shown in the taskbar. If the minimizebutton was clicked then my application should minimize and not be shown in the taskbar (except the icon to resize my application once again). Thanks! Stephan.

      S Offline
      S Offline
      sreejith ss nair
      wrote on last edited by
      #2

      hi, Minimizing a form to an icon at run time generates a Resize event. The WindowState property reflects the current state of the window. If you set the WindowState property to 1 (Minimized), the Form is minimized independently of whatever settings are in effect for the MinButton and BorderStyle properties. private void Form1_Resize(object sender, System.EventArgs e) { if(WindowState == FormWindowState.Minimized) >> check this } ************************** S r e e j i t h N a i r **************************

      L 1 Reply Last reply
      0
      • S sreejith ss nair

        hi, Minimizing a form to an icon at run time generates a Resize event. The WindowState property reflects the current state of the window. If you set the WindowState property to 1 (Minimized), the Form is minimized independently of whatever settings are in effect for the MinButton and BorderStyle properties. private void Form1_Resize(object sender, System.EventArgs e) { if(WindowState == FormWindowState.Minimized) >> check this } ************************** S r e e j i t h N a i r **************************

        L Offline
        L Offline
        leppie
        wrote on last edited by
        #3

        sreejith ss nair wrote: this.WindowState.ToString()=="Minimized") OUCH!!!!! WindowState == FormWindowState.Minimized top secret xacc-ide 0.0.1

        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