ich versuche einen Code einzufügen um die UserForm zu Minimieren Maximieren
Option Explicit
Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" ( _
ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Declare Function SetWindowPlacement Lib "user32.dll" ( _
ByVal hwnd As Long, _
ByRef lpwndpl As WINDOWPLACEMENT) As Long
Private Declare Function GetWindowPlacement Lib "user32.dll" ( _
ByVal hwnd As Long, _
ByRef lpwndpl As WINDOWPLACEMENT) As Long
Private Type POINTAPI
x As Long
y As Long
End Type
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Type WINDOWPLACEMENT
Length As Long
flags As Long
showCmd As Long
ptMinPosition As POINTAPI
ptMaxPosition As POINTAPI
rcNormalPosition As RECT
End Type
Private m_objUserForm As clsUserForm
Private m_blnFormInit As Boolean
Private Const GC_CLASSNAMEMSUSERFORM = "ThunderDFrame"
Private Const SW_MAXIMIZE = 3
Private Sub UserForm_Activate()
Dim lngHwnd As Long
Dim udtWinEst As WINDOWPLACEMENT
Set m_objUserForm = New clsUserForm
Set m_objUserForm.Form = Me
lngHwnd = FindWindow(GC_CLASSNAMEMSUSERFORM, Caption)
Call GetWindowPlacement(lngHwnd, udtWinEst)
udtWinEst.showCmd = SW_MAXIMIZE
Call SetWindowPlacement(lngHwnd, udtWinEst)
End Sub
Meine UserForm heißt "ZfP_Protokolle" ich habe schon alles versucht überall wo UserForm steht _
in "ZfP_Protokolle" umzuändern bekomme aber immer den fehler: "Fehler beim Kompilieren: _
Benutzerdefinierter Typ nicht definiert" immer in dieser Zeile
m_objUserForm As clsUserForm
Danke im Voraus an alle Helfer :-)