Click here to Skip to main content
15,903,175 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Please tell me how I can show an About dialog when I click a button.
Posted
Updated 21-Jun-11 5:26am
v2
Comments
Pete O'Hanlon 21-Jun-11 11:26am    
I'm going to edit your question because you show a terrible contempt for your keyboard.
Pete O'Hanlon 21-Jun-11 11:27am    
What environment are you trying to show it in? ASP.NET? WinForms? Silverlight? WPF?
sreejithc777 22-Jun-11 12:56pm    
win forms
Sergey Alexandrovich Kryukov 22-Jun-11 12:58pm    
The answers are ready, but you will get only one, only if you tag the question properly. Who wants to give you 3 solutions?
--SA

Select Add New Item (right click on your project and select Add > Windows Form. Choose About Box from the installed templates (rename it from AboutBox1.cs to AboutBox.cs). Click Add.

To open it, add a menu item to your main form under Help > About. Double click the menu to create an event handler, and in that event handler enter the following code:
C#
using (AboutBox dlg = new AboutBox())
{
  dlg.ShowDialog(this);
}
There you go, you've now got an About box - and it cleans up after itself as well.
 
Share this answer
 
Click the button in the .aspx page and you will be automatically transferred to the onclick even't. You can change your dialog presentation to .visible='true' or something.
 
Share this answer
 
Comments
Pete O'Hanlon 21-Jun-11 11:46am    
And if they aren't using ASP.NET? The OP needs to provide more information before you can formulate a meaningful answer.
try write data 'about' u require in panel control
panel control is a collection of controls
if u want u can place in it
set by default 'visible=false' for panel control

when u click on about button
in button event write the code
panel1.visible=true
 
Share this answer
 

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