天天看點

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
           

繼續閱讀