[求助]如何让一张图片充满整个窗体?
我在MIDFORM上加载了一个1024*768的图片由于这个midform是必须最大化了的,所以运行时图片不能充满整个窗体,在右边空出了一条
有什么办法能让图片充满整个窗体?
用了一个时钟控件.判断窗体面积有没有发生变化.
dim mai as double
Private Sub Form_Load()
Image1.Stretch = True
Image1.Top = 0
Image1.Left = 0
Image1.Height = Me.ScaleHeight
Image1.Width = Me.ScaleWidth
mai = Me.ScaleHeight * Me.ScaleWidth
End Sub
Private Sub Timer1_Timer()
If Me.ScaleHeight * Me.ScaleWidth <> mai Then
Image1.Stretch = True
Image1.Top = 0
Image1.Left = 0
Image1.Height = Me.ScaleHeight
Image1.Width = Me.ScaleWidth
mai = Me.ScaleHeight * Me.ScaleWidth
End If
End Sub