Sub DisableMaxButton()
Dim hMenu As Long
Dim OldStyle As Long
'Remove Max button
OldStyle = GetWindowLong(Me.HWND, GWL_STYLE)
SetWindowLong Me.HWND, GWL_STYLE, OldStyle And (Not WS_MAXIMIZEBOX)
'Remove from system menu
hMenu = GetSystemMenu(Me.HWND, 0&)
If hMenu Then
Call DeleteMenu(hMenu, SC_MAXIMIZE, MF_BYCOMMAND)
Call DrawMenuBar(Me.HWND)
End If
End Sub
Disable MaxButton in VB6
Langganan:
Posting Komentar (Atom)
0 comments:
Posting Komentar