Custom max/min button for borderless forms
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
2 posts
Page 1 of 1
Well I was just working on a project of mine and thought that the normal .maximized thing just fills the hole screen soo how can I fix this soo I came up with this
So to start go to settings and make two settings
My_Size - system.drawing.point
My_location - System.Drawing.Point
now double click your form load and put this in
Hope this help you lot I know its going to help me Tonz and it can make sure you program allways fits peoples screen rezalutions as well if you play with it
So to start go to settings and make two settings
My_Size - system.drawing.point
My_location - System.Drawing.Point
now double click your form load and put this in
Code: Select all
Now come to the form close event and add this Me.Size = My.Settings.My_size
Me.Location = My.Settings.My_location
Code: Select all
now for the kwl bit double click you maximize button and put in this My.Settings.My_size = Me.Size
My.Settings.My_location = Me.Location
Code: Select all
If Me.Height = Screen.PrimaryScreen.Bounds.Height - 40 Then
Me.Size = My.Settings.My_size
Me.Location = My.Settings.My_location
Else
Me.Height = Screen.PrimaryScreen.Bounds.Height - 40
Me.Width = Screen.PrimaryScreen.Bounds.Width
Me.Location = New Point(0, 0)
End If
Hope this help you lot I know its going to help me Tonz and it can make sure you program allways fits peoples screen rezalutions as well if you play with it
2 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023