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. Catching minimize event

Catching minimize event

Scheduled Pinned Locked Moved C#
5 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
    sjembek
    wrote on last edited by
    #1

    Hi, What event should I catch if I want to replace the minimize button code. I've tried catching the "Sizechanged" event but this fires every time a window is opened or resized, I only want to catch the event caused by the minimize button. I want to use this to create an application specific "taskbar" for all of my MDI client windows. Thanks in advance for any suggestions made!

    M 1 Reply Last reply
    0
    • S sjembek

      Hi, What event should I catch if I want to replace the minimize button code. I've tried catching the "Sizechanged" event but this fires every time a window is opened or resized, I only want to catch the event caused by the minimize button. I want to use this to create an application specific "taskbar" for all of my MDI client windows. Thanks in advance for any suggestions made!

      M Offline
      M Offline
      MIHAI_MTZ
      wrote on last edited by
      #2

      size changed; and test whether form.WindowState is minimized.

      S 1 Reply Last reply
      0
      • M MIHAI_MTZ

        size changed; and test whether form.WindowState is minimized.

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

        Ah ok, thanks. That worked. Now we're at it, would anyone happen to know how to make my mdi client window dock to its parent? Thanks again, cheers.

        D 1 Reply Last reply
        0
        • S sjembek

          Ah ok, thanks. That worked. Now we're at it, would anyone happen to know how to make my mdi client window dock to its parent? Thanks again, cheers.

          D Offline
          D Offline
          Dan Neely
          wrote on last edited by
          #4

          I'm not entirely sure what you're asking. Do you mean maximizing it?

          S 1 Reply Last reply
          0
          • D Dan Neely

            I'm not entirely sure what you're asking. Do you mean maximizing it?

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

            I mean having it stick to a specific side of its parent, just like controls can. Actually, this is easier than I though. Just set an mdi parent and set the dock property for you form to try it out.

            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