Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using .Net.I create a form & add Button in it.
When I Run the form that button is not getting displayed.

Which property i use to make button visible in Run time mode.
Posted
Comments
ZurdoDev 6-Dec-12 10:11am    
Set Visible = True

1 solution

Unless you changed the Visible property of the button when you dropped it on the designer, or altered any of it's other properties in code yourself, and you dropped it directly on the form, then if you can see it in the Design View, you will see it when you run the application.

So check in the design mode:
1) Can you see the control on the form?
2) Look at the Properties window - is Visible true (it is by default).
3) Check the button is in a visible container - if you right click it in the designer, the context menu will show the hierarchy of containers, starting with the form name. If you have dropped it into a container, that container will be listed under the form.

Drag a new button to the form (and only the form) and do nothing else to it. Run your app - can you see it? If so, then in the designer, compare the two buttons manually and make sure their properties are the same.
 
Share this answer
 
Comments
ridoy 6-Dec-12 12:43pm    
+5

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