Option Explicit
Private Sub Form_Load()
With lbl1
.Visible = False '没有注意到前面的"." 犯错了 以后记住
.Left = (pic1.ScaleWidth - lbl1.Width) / 2 标签框在图片框中水平居中
.Top = (pic1.ScaleHeight - lbl1.Height) / 2 标签框在图片框中垂直居中
End With
End Sub
Private Sub mntext_Click()
lbl1.Visible = True
pic1.Picture = LoadPicture()
End Sub
Private Sub mnupicture_Click()
pic1.Visible = True
lbl1.Visible = False
pic1.Picture = LoadPicture("F:\我的图片\风景图片\Tulips.jpg")
'相片路径不会输入,只用粘贴复制即可
End Sub
Private Sub mnupt_Click()
lbl1.Visible = True
pic1.Picture = LoadPicture("F:\我的图片\风景图片\Tulips.jpg") '加载图片
End Sub
Private Sub mnuquit_Click()
End
End Sub