(f)الكود الخامس والتسعون(f)
لإلغاء تفعيل زر التكبير في أعلى النافذة
Option Explicit Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare Function SetWindowPos Lib "user32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long Private Sub Form_Load() Const WS_MAXIMIZEBOX = &H10000 Const GWL_STYLE = (-16) Const SWP_FRAMECHANGED = &H20 Const SWP_NOMOVE = &H2 Const SWP_NOSIZE = &H1 Dim nStyle As Long nStyle = GetWindowLong(Me.hWnd, GWL_STYLE) Call SetWindowLong(Me.hWnd, GWL_STYLE, nStyle And Not WS_MAXIMIZEBOX) SetWindowPos Me.hWnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED Or SWP_NOMOVE Or SWP_NOSIZE End Sub
