[2005] Create a control in code...
I remember from a long time ago that this is possible but i forget the code to do it.
How do i create a control in code?
How would i make it so when a button is clicked it will create a new picture box at location 50, 50 with the resource file smile.bmp? I dont want to just make a already made picture box visible i want to create one.
Re: [2005] Create a control in code...
something like this...
Code:
Dim pBox As New PictureBox
MyBase.Controls.Add(pBox)
pBox.Location = New Point(50, 50)
pBox.Image = Image.FromFile("C:\wave.gif")
'/// putting your image's location where it says C:\wave.gif
Re: [2005] Create a control in code...
Thankyou i just forgot about the
Code:
Dim ???? As New ??????
. That actually solved a few of my problems.