Dear Rekan2,
 

 Mungkin ada solusi untuk minimize dan maximize user form untuk Office 2010 
dengan syestem 64 bit.
 Kode yang saya gunakan berikut namun tidak berfungsi. Adakah scrip yang lain?
 

 Public Const WS_MINIMIZEBOX = &H10000
 Public Const WS_MAXIMIZEBOX = &H20000
 Public Const GWL_STYLE = (-16)
 Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
 (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
 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 Declare Function DrawMenuBar Lib "user32" (ByVal hWnd As Long) As Long
 Public Sub AddMinMaxButton(ByVal FormCaption As String, _
 ByVal MinButton As Boolean, ByVal MaxButton As Boolean)
 Dim hWnd As Long
 Dim lngStyle As Long
 hWnd = FindWindow(vbNullString, FormCaption)
 lngStyle = GetWindowLong(hWnd, GWL_STYLE)
 If MaxButton Then
     lngStyle = lngStyle Or WS_MAXIMIZEBOX
 End If
 If MinButton Then
     lngStyle = lngStyle Or WS_MINIMIZEBOX
 End If
 SetWindowLong hWnd, GWL_STYLE, lngStyle
 DrawMenuBar hWnd
 
 End Sub
 

 

Kirim email ke