noborders

Status
Not open for further replies.

joe_90

Newcomer
Joined
Feb 27, 2003
Messages
2
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 ..
 
Last edited:
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...
 
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
 
Status
Not open for further replies.
Back
Top