Adding Picture Box Control at Run time
Adding Picture Box Control at Run time
Rate Adding Picture Box Control at Run time
(2(2 Vote))
'Run time addition:
'Open a standard exe form
'Type the code given below
Private sub Form_Load()
Dim Obj As Object
Set Obj = Form1.Controls.Add("VB.PictureBox", "Picture1")
Obj.Left = 0
Obj.Top = 0
Obj.Width = Form1.Width / 2
Obj.Height = Form1.Height / 2
Obj.Picture = LoadPicture("Path of the BMP file")
Obj.Visible = True
Set Obj = Nothing
End Sub
'Run the application and you see the Picture box displaying BMP file. over the Picture Box Control. Try to disable it.
Adding Picture Box Control at Run time Comments
No comments yet — be the first to post one!
Post a Comment