Click here to Skip to main content
15,887,296 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello

i am creating an framework like application [eg for understanding-visual studio IDE so that itself got design and run time that is we will design something by using controls and run that designed thing]

so in run time i dynamically created some .net controls and added in to one drawing view [third party] so when i click a button named run this designed thing on the drawing view has to run separately that is my applications run time.so how can i achieve this and one more thing how can i code these dynamically created controls before running


regards

ginnas
Posted
Comments
[no name] 6-Sep-12 8:29am    
You create your controls by using "new"... the rest of your question is nonsense.
Sergey Alexandrovich Kryukov 12-Sep-12 14:25pm    
Exactly.
--SA

1 solution

You have to create a control and add it to a container's Controls collection like Form, Panel, FlowLayoutPanel etc.

Ex:
Button btnSubmit = new Button();
btnSubmit.Text = "Submit";
this.Controls.Add(btnSubmit);

You can also specify Button's Size and Location using respective properties
 
Share this answer
 
Comments
Sandeep Mewara 6-Sep-12 12:20pm    
You missed Button ID?
Deepak_Sharma_ 7-Sep-12 9:09am    
Ya, you can assign ID to the Button using its btnSubmit.Name property but it should work even without it
ginnas 10-Sep-12 1:11am    
hello

thanks for the response

but my question is during run time how can we code the controls .in run time where we can create the events for the controls there only we can code something know,so how can we achieve this

regards

ginnas

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