Command-Button optimal anordnen
16.05.2006 09:09:39
gert
ich möchte gerne die Command-Button so anordnen, dass diese je nach Bildschirmauflösung zentriert, mit gleichem Abstand angezeigt werden.
Dies funktioniert an meinem PC mit Auflösung 1280 x 1024, jedoch nicht
an meinem Laptop. Dort sind die Buttons nach rechts verschoben
Auflösung 800 x 600)
Was muss ich tun damit es auch dort funktioniert?
Gibt es eine Möglichkeit die gesamte Breite zu berechnen?
Nachfolgenden Code habe ich bisher genutzt:
With Me
.Width = Application.Width
.Height = Application.Height
.Label204.Top = 40
.Label204.Left = Application.Width * 0.5 - Application.Width * 0.3
.CommandButton3.Top = .Height - .CommandButton3.Height - 50
.CommandButton3.Left = 100
.CommandButton7.Top = .CommandButton3.Top
.CommandButton7.Left = .CommandButton3.Left + .CommandButton3.Width + 16
.CommandButton6.Top = .CommandButton3.Top
.CommandButton6.Left = .CommandButton7.Left + .CommandButton7.Width + 16
.CommandButton4.Top = .CommandButton3.Top
.CommandButton4.Left = .CommandButton6.Left + .CommandButton6.Width + 16
.CommandButton5.Top = .CommandButton3.Top
.CommandButton5.Left = .CommandButton4.Left + .CommandButton4.Width + 16
End With
Für die Hilfe danke ich im Voraus
Viele Grüsse
Gert