Avis Junior Poster

Joined: 07 Oct 2003 Posts: 510 Location: India
|
Posted: Oct 8th, 2003 05:35 AM Post subject: Disable the "X" of your form |
|
|
This will disable the "X" of the window.
| Code: | Const MF_BYPOSITION = &H400
Private Declare Function GetSystemMenu Lib "User32" _
(ByVal hWnd As Long, ByVal bRevert _
As Long) As Long
Private Declare Function RemoveMenu Lib "User32" _
(ByVal hMenu As Long, ByVal nPosition _
As Long, ByVal wFlags As Long) As Long
Private Sub Form_Load()
RemoveMenu GetSystemMenu(Me.hWnd, 0), 6, MF_BYPOSITION
End Sub |
|
|