Make your Borderless own Design/Form!
Posted: Fri Aug 20, 2010 7:51 pm
Ok hello, to the beginning of the Tutorial, i want to say: "Dont make Mirrors, or anyone!", and i am german and i cant speak so nice english cryer;
We make: Minimize Form, Maximaze Form and Move Form cooll;
You need:
A Picturebox, and 2 Buttons! (For the 2 Buttons you can also take 2 Pictureboxes against!)
First one, make a new Project, and go to Properties window under to "Form Border Style" there you choise "None"
![Image]()
If you done that, you must to insert a picture in the picturebox, i choose an nice style (Is in the download included)
Now, choose on Size Mod "Stretch"...
![Image]()
![Image]()
Now dock the Picturebox1 on the Head (See on picture)
![Image]()
Choose the Size, now the came to the code!
By Button1 you type the Code: (Minimize Button)
![Image]()
Scroll down and select Mouse Down and make an doubleclick on it there you write following code:
![Image]()
We make: Minimize Form, Maximaze Form and Move Form cooll;
You need:
A Picturebox, and 2 Buttons! (For the 2 Buttons you can also take 2 Pictureboxes against!)
First one, make a new Project, and go to Properties window under to "Form Border Style" there you choise "None"

If you done that, you must to insert a picture in the picturebox, i choose an nice style (Is in the download included)
Now, choose on Size Mod "Stretch"...


Now dock the Picturebox1 on the Head (See on picture)

Choose the Size, now the came to the code!
By Button1 you type the Code: (Minimize Button)
Code: Select all
By Button2 you type the Code: (Close Button)
Me.WindowState = FormWindowState.Minimized
Code: Select all
Now go on the head of the code and insert following under Public Class Form1:
Me.Close
Code: Select all
Now click on the Picturebox1, and choose above the Properties windows "Events"Private _move As Boolean = False
Dim differencePoint As New Point

Scroll down and select Mouse Down and make an doubleclick on it there you write following code:
Code: Select all
Now, you go against to the Events windows, and search for: "MouseMove" there you write following code:
_move = True
differencePoint = e.Location
Code: Select all
At the last step, you search "MouseUp" there you write following Code:
If _move Then
Dim newX As Int32 = (Me.Location.X - differencePoint.X) + (e.X)
Dim newY As Int32 = (Me.Location.Y - differencePoint.Y) + (e.Y)
Me.Location = New Point(newX, newY)
End If
Code: Select all
So the Result is:_move = False
