Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (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 by joe_90
Posted

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
Posted

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

Guest
This topic is now closed to further replies.
×
×
  • Create New...