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. Visual Basic
  4. code on form minimize button

code on form minimize button

Scheduled Pinned Locked Moved Visual Basic
csharp
4 Posts 4 Posters 2 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.
  • A Offline
    A Offline
    amaneet
    wrote on last edited by
    #1

    Hi there, can i write some code on the form minimize button , I am using vb.net 2005

    A D _ 3 Replies Last reply
    0
    • A amaneet

      Hi there, can i write some code on the form minimize button , I am using vb.net 2005

      A Offline
      A Offline
      aphei
      wrote on last edited by
      #2

      you can make a new button to minimize you form and hide the form minimize button... so you can write some code in the new minimize button that you made

      1 Reply Last reply
      0
      • A amaneet

        Hi there, can i write some code on the form minimize button , I am using vb.net 2005

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        There is no event specific to the Minimize control button in the uppoer right corner of the form. You have to handle the form's Resize event, and in that code, check the WindowState property to see if it's been minimized.

        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007

        1 Reply Last reply
        0
        • A amaneet

          Hi there, can i write some code on the form minimize button , I am using vb.net 2005

          _ Offline
          _ Offline
          _Richard Faulkner
          wrote on last edited by
          #4

          Actually, there is a quite simple way. Type the code below, where <code>; is the action you want when the form is minimized: Private Sub Form1_SizeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.SizeChanged If Me.WindowState = FormWindowState.Minimized Then End If End Sub Please mail me with any questions or comments. Best Regards, Richard Faulkner

          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