moving a Form With No Border
-
sorry foy my english again. I want clic on my WinForm and move it (rigth, left, up, down) how can i do it? i am from mexico....thanks CodeProject :)
-
sorry foy my english again. I want clic on my WinForm and move it (rigth, left, up, down) how can i do it? i am from mexico....thanks CodeProject :)
You need to write the code to do this, handle a mouse down, mouse move and mouse up on your form. While the mouse is down, if the mouse moves, move the form.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
sorry foy my english again. I want clic on my WinForm and move it (rigth, left, up, down) how can i do it? i am from mexico....thanks CodeProject :)
http://www.codeproject.com/KB/vbscript/VBBorderless.aspx[^]
Kristian Sixhoej
"Failure is not an option" - Gene Kranz
-
sorry foy my english again. I want clic on my WinForm and move it (rigth, left, up, down) how can i do it? i am from mexico....thanks CodeProject :)
This Works like a dream for me.
Dim pt as point dim hdMousDown as Boolean Private Sub SetPoint() If hdMousedown = True Then hdMousedown = False Else hdMousedown = True pt = Me.PointToClient(Control.MousePosition) End Sub Private Sub Form1_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Form1.MouseDown SetPoint() End Sub Private Sub Form1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Form1.MouseUp SetPoint() End Sub Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Form1.MouseMove If hdMousedown = True Then Me.Location = New Point(Control.MousePosition.X - pt.X, Control.MousePosition.Y - pt.Y) End If End Sub
Please check out my articles: The ANZAC's articles