Forum: Visual Basic |
Thema:
Re: Bildschirm-Auflösungsunabhänging |
Von:
Timo Ulrich (
24.05.2005 10:56) |
Private Sub Form_Resize()
Dim breite As Integer, hoehe As Integer, posx As Integer, posy As Integer
breite = Form1.ScaleWidth
hoehe = Form1.ScaleHeight
posx = Form1.ScaleLeft
posy = Form1.ScaleTop
Command1.Top = (posy + hoehe / 5)
Command1.Left = (posx + breite / 5)
If breite < 5000 Then
Command1.Width = 1000
Else
Command1.Width = breite / 5
End If
If hoehe < 4000 Then
hoehe = 500
Else
Command1.Height = hoehe / 10
End If
End Sub
So sitzt ein Button z.B. immer relativ zur Bildschirmgröße und passt sich bei Änderungen der Bildschirmgröße an.
He likes to topple those who have the farthest to fall.
Antworten
Vorsicht bei der Eingabe: Die Zeichen ' oder -- sind nicht erlaubt!