Minimieren - Maximieren
26.05.2006 16:12:19
gert
ich möchte gerne, dass mein Hauptmenü vom Benutzer verkleinert, vergrößert bzw. minimert werden kann. Dazu benutze ich folgenden Code.
Private Sub UserForm_Initialize()
Dim iTop As Integer, iLeft As Integer
With Me
.Width = Application.Width
.Height = Application.Height
iTop = .Height - .CommandButton3.Height - 100
iLeft = (.Width - CommandButton3.Width - CommandButton4.Width - CommandButton5.Width - CommandButton6.Width - CommandButton7.Width - 64) / 2
.Label204.Top = 40
.Label204.Left = Application.Width * 0.5 - Application.Width * 0.3
.CommandButton3.Top = iTop
.CommandButton3.Left = iLeft
.CommandButton7.Top = iTop
.CommandButton7.Left = .CommandButton3.Left + .CommandButton3.Width + 16
.CommandButton6.Top = iTop
.CommandButton6.Left = .CommandButton7.Left + .CommandButton7.Width + 16
.CommandButton4.Top = iTop
.CommandButton4.Left = .CommandButton6.Left + .CommandButton6.Width + 16
.CommandButton5.Top = iTop
.CommandButton5.Left = .CommandButton4.Left + .CommandButton4.Width + 16
End With
Leider habe ich nur die Möglichkeit, dass Programm zu schließen.
Mit welchem Code kann ich das Programm minimieren - maximieren?
Für die Hilfe danke ich im Voraus
mit freundlichen Grüssen
gert