Click here to Skip to main content
16,011,711 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am new in c# Programming..
how to show message box in c#. i want i click on button its show message "Button Clicked"
Thanks you
Posted
Updated 5-Dec-14 1:21am
v2
Comments
Sinisa Hajnal 5-Dec-14 6:12am    
Google it. It is very simple. Go on MSDN and look at button events. there are plenty of examples.
Tariq Ghaffar 5-Dec-14 6:59am    
Solve this also.
http://www.codeproject.com/Questions/850190/Socket-io-Server-side

MessageBox.Show("Hello Welcome to C#");
 
Share this answer
 
In the button click event handler:

MessageBox.Show("Button Clicked!");
 
Share this answer
 
Comments
Tariq Ghaffar 5-Dec-14 6:59am    
Solve this also please.
http://www.codeproject.com/Questions/850190/Socket-io-Server-side
// The simplest overload of MessageBox.Show. [1]
//
MessageBox.Show("Dot Net Perls is awesome.");
//
// Dialog box with text and a title. [2]
//
MessageBox.Show("Dot Net Perls is awesome.",
"Important Message");
//
// Dialog box with two buttons: yes and no. [3]
//
DialogResult result1 = MessageBox.Show("Is Dot Net Perls awesome?",
"Important Question",
MessageBoxButtons.YesNo);
//
// Dialog box with question icon. [4]
//
DialogResult result2 = MessageBox.Show("Is Dot Net Perls awesome?",
"Important Query",
MessageBoxButtons.YesNoCancel,
MessageBoxIcon.Question);
 
Share this answer
 
Comments
Marcin Kozub 5-Dec-14 6:26am    
Why are you creating two solutions? Is that hard to click on 'Improve solution' and update your answer?
Tariq Ghaffar 5-Dec-14 6:59am    
this very simple haha
Tariq Ghaffar 5-Dec-14 6:59am    
http://www.codeproject.com/Questions/850190/Socket-io-Server-side
Solve this also please.

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