
Private Sub GetPicInfo (FilePath as String)
On Error Resume Next
Dim lWidth as Long, lHeight as Long, lTmp (1) as Long
Picture1.Picture = LoadPicture(FilePath)
lTmp(0) = Picture1.Width
lTmp(1) = Picture1.Height
Picture1.AutoSize = True
lWidth = Picture1.Width \ Screen.TwipsPerPixelX - 4
lHeight = Picture1.Height \ Screen.TwipsPerPixelY - 4
Picture1.AutoSize = False
Picture1.Width = lTmp(0)
Picture1.Height = lTmp(1)
MsgBox "Width = " & Trim(Str(lWidth)) & _
", Height = " & Trim(Str(lHeight))
End Sub
Picture1.Width
Picture1.Height
Picture1.Picture.Width
Picture1.Picture.Height
Private Sub Command1_Click()
Image1.Height = Image1.Height + 2
End Sub
Boris_BGB писал(а):Прибавлять\убавлять размер:
- Код: Выделить всё
Private Sub Command1_Click()
Image1.Height = Image1.Height + 2
End Sub
control.Move x, y, [Width], [Height]
Picture1.Move x, y, [Width], [Height]
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 5