Showing posts with label Maximize. Show all posts
Showing posts with label Maximize. Show all posts

Thursday, August 21, 2008

Removing Maximize Button

Hello there.

This API Codes will help you to remove the maximize button in form.

Public Declare Function GetWindowLong Lib "user32" Alias _
"GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long

Public Declare Function SetWindowLong Lib "user32" Alias _
"SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long

Public Const GWL_STYLE = (-16)
Public Const WS_MAXIMIZEBOX = &H10000
Public Const WS_MINIMIZEBOX = &H20000

Hope this one can help.