Page 1 of 1

HowTo: Codeing Minimize, Maximize and Close buttons

Posted: Mon Nov 30, 2009 7:22 am
by Miutubevids
kk in this tut i'll show you how to code
minimize,maximize and close buttons for your form

ok so make 3 buttons
a close button a minimize button and a maximize button
you ca ether make an image and import it as the background of that button and have a style of Flat
or you can use like a _ or X

kk
so this is the code for:
Maximize button: Me.WindowState = FormWindowState.Maximized
Minimize button: Me.WindowState = FormWindowState.Minimized
Close button: Close
or application.exit


:)

Re: HowTo: Codeing Minimize, Maximize and Close buttons

Posted: Mon Nov 30, 2009 11:16 pm
by GoodGuy17
This is a Code Snippet, somebody should move it, but nice snippet keep 'em coming! cooll;

Re: HowTo: Codeing Minimize, Maximize and Close buttons

Posted: Mon Nov 30, 2009 11:46 pm
by Nery
#Moved to Quick Snips

Re: HowTo: Codeing Minimize, Maximize and Close buttons

Posted: Tue Dec 01, 2009 1:59 am
by NoWayIn
Miutubevids wrote:
kk in this tut i'll show you how to code
minimize,maximize and close buttons for your form

ok so make 3 buttons
a close button a minimize button and a maximize button
you ca ether make an image and import it as the background of that button and have a style of Flat
or you can use like a _ or X

kk
so this is the code for:
Maximize button: Me.WindowState = FormWindowState.Maximized
Minimize button: Me.WindowState = FormWindowState.Minimized
Close button: Close
or application.exit


:)
With VB 2008 you can do
Code: Select all
WindowState =  ' 0, 1, or 2, 0 = Normal, 1 = Minimize, 2 = Maximize 
For closing, use
Code: Select all
End
It saves time and its easier isn't it :D

Re: HowTo: Codeing Minimize, Maximize and Close buttons

Posted: Tue Dec 01, 2009 5:17 am
by Miutubevids
ohk thx NoWayIn
soz about that yea should have been snippet
:|

Re: HowTo: Codeing Minimize, Maximize and Close buttons

Posted: Wed Dec 09, 2009 3:36 am
by Robby
good job.
this is really helpful for the new forms that u make without a border(if u get wat imean)

Re: HowTo: Codeing Minimize, Maximize and Close buttons

Posted: Fri Apr 22, 2011 6:54 am
by RonaldHarvey
Cool Snippet..... Thanks. cooll;