TUT]How to move a borderless form[TUT

Posts 1–8 of 8 · Page 1 of 1
TUT]How to move a borderless form[TUT
just copy and paste this anywhere in your code:

Remove the spaces in the second line where it says H C L!

Code:
Const WM_NCHITTEST As Integer = &H84
    Const H C L IENT As Integer = &H1   'remove spaces from H C L IENT
    Const HTCAPTION As Integer = &H2



    Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
        Select Case m.Msg
            Case WM_NCHITTEST
                MyBase.WndProc(m)
                If m.Result = H***IENT Then m.Result = HTCAPTION
            Case Else
                MyBase.WndProc(m)
        End Select
    End Sub

EDIT: Just to clear up an confusion, this code can go anywhere. At the bottom of your code or right after Public class form1



thank me if i helped
You need to tell them where to put the code.
I believe it goes under Form1
Quote Originally Posted by Pixie View Post
You need to tell them where to put the code.
I believe it goes under Form1
it can go anywhere. At the bottom of your code or right after Public class form1
Quote Originally Posted by XGelite View Post
just copy and paste this anywhere in your code:

Code:
Const WM_NCHITTEST As Integer = &H84
    Const H***IENT As Integer = &H1
    Const HTCAPTION As Integer = &H2



    Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
        Select Case m.Msg
            Case WM_NCHITTEST
                MyBase.WndProc(m)
                If m.Result = H***IENT Then m.Result = HTCAPTION
            Case Else
                MyBase.WndProc(m)
        End Select
    End Sub

EDIT: Just to clear up an confusion, this code can go anywhere. At the bottom of your code or right after Public class form1



thank me if i helped
I´m not going to thanks you!!!!!!!!!!!
You steal someones code and don´t give him creditz
Respect that!!!

orginal tread: http://www.mpgh.net/forum/33-visual-...vb-2008-a.html
Quote Originally Posted by Zoom View Post
I´m not going to thanks you!!!!!!!!!!!
You steal someones code and don´t give him creditz
Respect that!!!

orginal tread: http://www.mpgh.net/forum/33-visual-...vb-2008-a.html

U fail!
Don't flame him.
And that has been posted 4 weeks ago.
Quote Originally Posted by Zoom View Post
I´m not going to thanks you!!!!!!!!!!!
You steal someones code and don´t give him creditz
Respect that!!!

orginal tread: http://www.mpgh.net/forum/33-visual-...vb-2008-a.html
umm wth?? i didnt steal his code.. i found this on a tutorial on the internet a long time back. i didnt even know that thread existed. and i doubt he made the code up himself -.-
Quote Originally Posted by XGelite View Post
umm wth?? i didnt steal his code.. i found this on a tutorial on the internet a long time back. i didnt even know that thread existed. and i doubt he made the code up himself -.-
I´m sorry
Quote Originally Posted by XGelite View Post
just copy and paste this anywhere in your code:

Code:
Const WM_NCHITTEST As Integer = &H84
    Const H***IENT As Integer = &H1
    Const HTCAPTION As Integer = &H2



    Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
        Select Case m.Msg
            Case WM_NCHITTEST
                MyBase.WndProc(m)
                If m.Result = H***IENT Then m.Result = HTCAPTION
            Case Else
                MyBase.WndProc(m)
        End Select
    End Sub

EDIT: Just to clear up an confusion, this code can go anywhere. At the bottom of your code or right after Public class form1



thank me if i helped
Um you should edit it and put () around the H(CL)IENT part because for some reason mpgh blocks it.
Posts 1–8 of 8 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

Need help?