05. februar 2002 - 13:44
#2
du kan også API (det vil man nok kun bruge hvis man skal endre borderstyle mens programmet køre/run)
Option Explicit
Private Declare Function SetWindowPos Lib "user32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Const GWL_STYLE = (-16)
Private Const WS_CAPTION = &HC00000
Private Const SWP_NOSIZE = &H1
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOZORDER = &H4
Private Const SWP_FRAMECHANGED = &H20
Private Const SWP_NOOWNERZORDER = &H200
Private Sub Command1_Click()
Dim ret As Long
ret = GetWindowLong(Me.hWnd, GWL_STYLE)
Call SetWindowLong(Me.hWnd, GWL_STYLE, ret And Not WS_CAPTION)
SetWindowPos Me.hWnd, 0, 0, 0, 0, 0, SWP_NOOWNERZORDER Or SWP_NOZORDER Or SWP_FRAMECHANGED Or SWP_NOMOVE Or SWP_NOSIZE
End Sub