Hi all, Today i will be showing u all how to make your vb.net form move without any borders (title bar), so lets begin..!
Codes:
Public Class Form1
#Region " Global Variables "
Dim Point As New System.Drawing.Point()
Dim X, Y As Integer
#End Region
#Region " GUI "
Private Sub Form_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove
If e.Button = MouseButtons.Left Then
Point = Control.MousePosition
Point.X = Point.X - (X)
Point.Y = Point.Y - (Y)
Me.Location = Point
End If
End Sub
Private Sub Form_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown
X = Control.MousePosition.X - Me.Location.X
Y = Control.MousePosition.Y - Me.Location.Y
End Sub
#End Region
End Class
_________________________________________________________________________
2. Minimize Box: Add one PictureBox component and choose get the image of minimize button from internet and choose that image. Now double click that image and type in the following code.
Minimize Box:
WindowState = FormWindowState.Minimized
--------------------------------------------------
Close box:
me.close
_________________________________________________________________________
Here is the video tutorial:
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2010
(13)
-
▼
April
(6)
- Textbox - Select All (Ctrl+A) and Scroll Visual Ba...
- Run Program on Windows Startup Tutorial Visual Ba...
- Email Validation Entered Into Textbox Tutorial Vis...
- Visual Basic Send Email - Smtp Tutorial - {VB.net}
- How to make form move Borderless (No Title Bar) Vi...
- Listbox Tutorial - Add, Remove Item, Save, Reload ...
-
▼
April
(6)
No comments:
Post a Comment