HowTo: Codeing Minimize, Maximize and Close buttons

Use this board to post your code snippets - tips and tricks
7 posts Page 1 of 1
Contributors
User avatar
Miutubevids
VIP-Member
VIP-Member
Posts: 293
Joined: Mon Nov 23, 2009 11:39 am

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


:)
Don't BS the BSer

RePlay V1.0 - Record your Mouse Clicks, Mouse Movments and Keystrokes
AutoClicker v1.0
SnowScreen
Reaction Timer Game V1.0
GoodGuy17
Coding God
Coding God
Posts: 1610
Joined: Mon Sep 07, 2009 12:25 am

This is a Code Snippet, somebody should move it, but nice snippet keep 'em coming! cooll;
User avatar
Nery
Co-Admin Moderator
Co-Admin Moderator
Posts: 1117
Joined: Mon Sep 07, 2009 8:11 pm

#Moved to Quick Snips
NoWayIn
VIP - Donator
VIP - Donator
Posts: 444
Joined: Sat Nov 21, 2009 11:16 pm

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
User avatar
Miutubevids
VIP-Member
VIP-Member
Posts: 293
Joined: Mon Nov 23, 2009 11:39 am

ohk thx NoWayIn
soz about that yea should have been snippet
:|
Don't BS the BSer

RePlay V1.0 - Record your Mouse Clicks, Mouse Movments and Keystrokes
AutoClicker v1.0
SnowScreen
Reaction Timer Game V1.0
User avatar
Robby
VIP - Donator
VIP - Donator
Posts: 417
Joined: Mon Aug 03, 2009 4:01 am

good job.
this is really helpful for the new forms that u make without a border(if u get wat imean)
My current Projects Listed Below:
Toixt++ Text Editor Just 10 or less more features to go!
Image
Image
User avatar
RonaldHarvey
Top Poster
Top Poster
Posts: 113
Joined: Tue Apr 05, 2011 2:32 pm

Cool Snippet..... Thanks. cooll;
7 posts Page 1 of 1
Return to “Quick Snips”