Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hey guys,

i am making my GUI/Virtual Machine and i need to know how to create a new picture box with the press of a button. i am making my desktop and i need to make picture boxes. i need to do a right click and pop up my menu(which i know how to do) and then i click on new\text editor and then it makes a new picture box and then i can double click on it and it will open up my form(lets just say form2 for now). and how would i keep data within that image? i have a vague idea but no 100% sure.

could you please answer with the information that i have given you.
Posted

1 solution

I hope you're not adding dozens of these to your form. The more controls you add, the slower your form is to repaint.

Dim newPicBox As New PictureBox()
newPicBox.Location = ...
newPicBox.Size = ...
Me.Controls.Add(newPicBox)
 
Share this answer
 
Comments
Member 8378691 12-Apr-12 21:22pm    
im making my operating system GUI and i need to figure out how to add the icon of a text file, but i want multiple icons and then i will assign a value to each of them
Dave Kreskowiak 12-Apr-12 23:23pm    
A picturebox for every file is not the way to do this. Look at the ListView control instead.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900