|
-
Jul 3rd, 2001, 10:38 AM
#1
Try this:
VB Code:
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()
'Remove sizing
Call RemoveMenu(GetSystemMenu(hwnd, 0), 2, MF_BYPOSITION)
'Remove minimizing
Call RemoveMenu(GetSystemMenu(hwnd, 0), 2, MF_BYPOSITION)
End Sub
-
Jul 3rd, 2001, 01:55 PM
#2
Originally posted by Megatron
Try this:
VB Code:
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()
'Remove sizing
Call RemoveMenu(GetSystemMenu(hwnd, 0), 2, MF_BYPOSITION)
'Remove minimizing
Call RemoveMenu(GetSystemMenu(hwnd, 0), 2, MF_BYPOSITION)
End Sub
Minimizing should be changed to 3.
2 = Resizing
3 = Minimizing
VB Code:
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()
'Remove sizing
Call RemoveMenu(GetSystemMenu(hwnd, 0), [b]2[/b], MF_BYPOSITION)
'Remove minimizing
Call RemoveMenu(GetSystemMenu(hwnd, 0), [b]3[/b], MF_BYPOSITION)
End Sub
-
Jul 3rd, 2001, 02:35 PM
#3
No it shouldn't.
Removing the size causes each menu to move down one level, then Minimize goes from 3 to 2.
-
Jul 3rd, 2001, 08:59 PM
#4
Junior Member
-
Jul 3rd, 2001, 09:49 PM
#5
Ah, I see Megatron. Wow, I didn't know that worked like that, very neat.
-
Jul 4th, 2001, 09:21 AM
#6
If you removed the higher indexed menu first, then it'll work fine without the "push" effect.
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
|