Hejsa.
Det kan altså godt lade sig gøre at disable "maximer" knappen, prøv at start et nyt projekt, og indsæt flg. kode, hvis du så starter formen i 1024 * 768 er "Max" knappen disablet, men hvis du starter programmet i 800 * 600 er "Max" knappen enablet.
Option Explicit
Private Declare Function GetSystemMetrics Lib "user32" (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 GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Const WS_MINIMIZEBOX = &H20000
Private Const WS_MAXIMIZEBOX = &H10000
Private Const GWL_STYLE = (-16)
Private Const WS_MAXIMIZE = &H1000000
Dim X As Integer
Private Sub Form_Load()
X = GetSystemMetrics(0)
Dim lngStyle As Long
If X = 1024 Then
lngStyle = GetWindowLong(Me.hwnd, GWL_STYLE)
lngStyle = lngStyle And Not (WS_MAXIMIZEBOX) Xor WS_MAXIMIZE
lngStyle = SetWindowLong(Me.hwnd, GWL_STYLE, lngStyle)
End If
End Sub
Er vi ikke eninge om at det virker ???, det var et eksempel jeg fandt på
www.vbforums.com SUPER sted
Mvh.
Christian H