1,453
社区成员
发帖
与我相关
我的任务
分享Dim l, t, w, h
Private Sub Form_Load()
Picture1.AutoSize = True
Picture1.AutoRedraw = True
Picture1.BackColor = vbBlack
l = Picture1.Left / Me.Width
t = Picture1.Top / Me.Height
w = Picture1.Width / Me.Width
h = Picture1.Height / Me.Height
End Sub
Private Sub Form_Resize()
With Picture1
.Left = l * Me.Width
.Top = t * Me.Height
.Width = w * Me.Width
.Height = h * Me.Height
End With
Picture1.PaintPicture ImageList1.ListImages(1).Picture, 0, 0, Picture1.Width, Picture1.HeightDim l, t, w, h
Private Sub Form_Load()
Picture1.AutoSize = True
Picture1.AutoRedraw = True
Picture1.BackColor = vbBlack
l = Picture1.Left / Me.Width
t = Picture1.Top / Me.Height
w = Picture1.Width / Me.Width
h = Picture1.Height / Me.Height
End Sub
Private Sub Form_Resize()
With Picture1
.Left = l * Me.Width
.Top = t * Me.Height
.Width = w * Me.Width
.Height = h * Me.Height
End With
End Sub