Skip to main content

Write a VB program to load picture box at a runtime

· One min read
Kaustubh Kulkarni
file.vb
Private Sub Form_Load()  

Dim pc As Control
Set pc = Controls.Add("VB.PictureBox", "MyPicture")
pc.Left = 100
pc.Top = 100
pc.Width = 10000
pc.Height = 6000
pc.Picture = LoadPicture("C:UsersRamdasPicturesnr_visiting_card0002.jpg")
pc.Visible = True

End Sub