天天看点

Visual Studio2019VB和VB6.0的PictureBox代码加载图片的区别

VS2019VB代码 :

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
PictureBox1.Image = Image.FromFile("C:\Users\hasee\Desktop\中国居民平衡膳食宝塔.jpg")
End Sub
           

VB6代码:

Private Sub Form_Load()
Picture1.AutoRedraw = True
Picture1.Picture = LoadPicture("C:\Users\hasee\Desktop\中国居民平衡膳食宝塔.jpg")
End Sub
           

继续阅读