|
-
Apr 23rd, 2001, 01:56 AM
#1
Thread Starter
Lively Member
I got this code from a reply. I couldn't find my thread so I couldn't follow it up there. It's suppose to disable the X at the upper right corner of the Window which exits the form.
Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
Private Declare Function GetSystemMenu Lib "user32" (ByVal hWnd As Long, ByVal bRevert As Long) As Long
Private Const MF_BYPOSITION = &H400&
Private Sub Form_Load()
RemoveMenu GetSystemMenu(Me.hWnd, 0), 6, MF_BYPOSITION 'removes the "X" box and the System Menu
End Sub
Well, if you'll try this code, it would look as if it would work the way it does. The X would become gray in color, but when I accidentally clicked the button, my form still exits!!!
Please help!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|