Support Forums
Changing the form look? - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Visual Basic and the .NET Framework (https://www.supportforums.net/forumdisplay.php?fid=19)
+---- Thread: Changing the form look? (/showthread.php?tid=1829)

Pages: 1 2


RE: Changing the form look? - Extasey - 10-20-2009

I'm pretty sure the links I posted did invole that, but I thought you meant you just wanted to remove the buttons, that's why I said "use some command buttons to make the exit, minimize and maximize buttons"

Well, I think I said that! I'm on my phone andim too lazy to check!


RE: Changing the form look? - malcomhfc - 10-27-2009

One problem your going to run into when using a borderless form is, the ability to drag the form around the screen. Using the snippet code below this will fix it.

Paste this anywhere in your Form code. Enjoy

Code:
Const WM_NCHITTEST As Integer = &H84
Const HTCLIENT 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 = HTCLIENT Then m.Result = HTCAPTION
Case Else
'Make sure you pass unhandled messages back to the default message handler.
MyBase.WndProc(m)
End Select
End Sub



RE: Changing the form look? - ProspectDotNet - 10-27-2009

(10-27-2009, 03:10 AM)malcomhfc Wrote: One problem your going to run into when using a borderless form is, the ability to drag the form around the screen. Using the snippet code below this will fix it.

Paste this anywhere in your Form code. Enjoy

Code:
Const WM_NCHITTEST As Integer = &H84
Const HTCLIENT 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 = HTCLIENT Then m.Result = HTCAPTION
Case Else
'Make sure you pass unhandled messages back to the default message handler.
MyBase.WndProc(m)
End Select
End Sub

Thanks for this.


RE: Changing the form look? - Conspiracy - 10-27-2009

(10-19-2009, 11:05 PM)Extasey Wrote: http://www.lmgtfy.com/?q=change+form+icon+vb6
http://www.lmgtfy.com/?q=change+form+icon+vb6remove+minimize+maximize+close+buttons+visual+basic

What's wrong with you? This is a forum, nevermind a forum for support.