AW: "X" ausblenden?
17.10.2007 12:09:07
Jens
Hallo Heiner
K.Rola hat mal folgenden Code geschrieben.
Der sollte Dir helfen.
Option Explicit
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
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
Const WS_MAXIMIZEBOX = &H10000
Const GWL_STYLE = (-16)
Sub Kreuz_weg(objUF As Object)
Dim hWnd As Long, lStyle As Long
Select Case Int(Val(Application.Version))
Case 8
hWnd = FindWindow("ThunderXFrame", objUF.Caption)
Case 9 To 11
hWnd = FindWindow("ThunderDFrame", objUF.Caption)
End Select
lStyle = GetWindowLong(hWnd, 0)
SetWindowLong hWnd, GWL_STYLE, lStyle Or WS_MAXIMIZEBOX
End Sub
'-----------------------------------------------------------------------------------------------------------------------------------------------------
'Ins Modul des userforms
'-----------------------------------------------------------------------------------------------------------------------------------------------------
Private Sub UserForm_Initialize()
Call Kreuz_weg(Me)
End Sub
Gruß aus dem Sauerland
Jens