Adesso sono andato un po' avanti grazie al tuo aiuto,
Ho scritto questo:
Dim qqh, qqw, ht, ll As Integer
Dim ml_DimHeight As Long
Dim ml_DimWidth As Long
Private Sub Form_Load()
Form1.Height = Screen.Height '* 0.9
Form1.Width = Screen.Width '* 0.9
ml_DimHeight = Screen.Height '* 0.9
ml_DimWidth = Screen.Width '* 0.9
Image1.Width = 945
Image1.Height = 1155
Image2.Width = 945
Image2.Height = 1155
Image3.Width = 945
Image3.Height = 1155
Image4.Width = 945
Image4.Height = 1155
End Sub
Private Sub Form_Resize()
'image 2
If ml_DimHeight > 0 Then
Image1.Height = Image1.Height * (Form1.Height / ml_DimHeight)
Image2.Height = Image2.Height * (Form1.Height / ml_DimHeight)
Image3.Height = Image3.Height * (Form1.Height / ml_DimHeight)
Image4.Height = Image4.Height * (Form1.Height / ml_DimHeight)
End If
If ml_DimWidth > 0 Then
Image1.Width = Image1.Width * (Form1.Width / ml_DimWidth)
Image2.Width = Image2.Width * (Form1.Width / ml_DimWidth)
Image3.Width = Image3.Width * (Form1.Width / ml_DimWidth)
Image4.Width = Image4.Width * (Form1.Width / ml_DimWidth)
End If
Image1.Left = 0
Image1.Top = 0
Image2.Left = 0
Image2.Top = ml_DimHeight - Image2.Height + 100
Image3.Left = ml_DimWidth - Image3.Height + 100
Image3.Top = 0
Image4.Left = ml_DimWidth - Image4.Height
Image4.Top = ml_DimHeight - Image4.Width
ml_DimHeight = Form1.Height
ml_DimWidth = Form1.Width
end sub
Vorrei che ridimensionando il form le 4 immaggini mi rimangono sempre ai 4 vertici del form ridimensionandosi sempre in %.
Sembra funzionare la 1° in alto a sx le altre un po' meno.
Dove sbaglio ?
Ultima modifica effettuata da visualrenzo il 30/01/2011 alle 12:11 |