joe_90 Posted February 27, 2003 Posted February 27, 2003 (edited) How do i get completely rid of the boarder of a window Borderstyle = 0 None but allow me to still move it around and put min max close buttons on it.. I just cannot get the borderstyle to 0 and allow movement... ? Thanks oh and in vb6 .. Edited February 27, 2003 by joe_90
billy_bob169 Posted February 27, 2003 Posted February 27, 2003 This is a .NET forum, so in >NET you could just add three buttons(min, max, & close) then put logic into those buttons to do what you wanted. i.e. the max button: Me.WindowState = FormWindowState.Maximized I don't know what the exact syntax is in VB6, but I am sure it is similar... I'd rather be riding than working
joe_90 Posted February 27, 2003 Author Posted February 27, 2003 Thanks.. I used: Option Explicit Private Declare Function ReleaseCapture Lib "user32" () As Long Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Private Const HTCAPTION = 2 Private Const WM_NCLBUTTONDOWN = &HA1 Private Const WM_SYSCOMMAND = &H112 Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) ReleaseCapture SendMessage hwnd, WM_NCLBUTTONDOWN, _ HTCAPTION, 0& End Sub
*Gurus* divil Posted February 27, 2003 *Gurus* Posted February 27, 2003 This is not a VB6 forum. MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts