Tutorials Navigation

Tutorials :: New :: Popular :: Top Rated

Tutorials: 18,357 Categories: 12

Total Tutorial Views: 42,396,306

[C#] Beginners Tutorial: Creating A Message Box

Tutorial Name: [C#] Beginners Tutorial: Creating A Message Box  

Category: PC Tutorials

Submitted By: MX

Date Added:

Comments: 2

Views: 1,845

Related Forum: PC Building Forum

Share:

Creating a message box in C#

1) Open up Visual Studios
2) Select new project


[ Register or Signin to view external links. ]


3) You should then be greeted with this:

[ Register or Signin to view external links. ]


select windows form application, you can then name your project to whatever you want.
4) Your page should now look like this:

[ Register or Signin to view external links. ]


5) Your next step is to add a button, you can do this by navigating your toolbar, finding the option 'Button' from the list, and then dragging it onto your form.

if steps followed correctly it should now look like this:

[ Register or Signin to view external links. ]

Hint: You can rename, resize and many other cool options located in the properties tab when you have your button selected.

[ Register or Signin to view external links. ]


7) Now we need to add the actual code, you do this by double clicking on the button, you will then be greeted with this page:

[ Register or Signin to view external links. ]


Now you need to type the following code:
MessageBox.Show("YOUR TEXT HERE");


Example:

[ Register or Signin to view external links. ]


That should be everything, now all you need to do is clikc the green arrow that says start, when your application opens press the buttona nd the text will appear:

[ Register or Signin to view external links. ]

Thanks for reading

-HondaCRF












Ratings

Current rating: 8.25 by 4 users
Please take one second and rate this tutorial...

Not a Chance
1
2
3
4
5
6
7
8
9
10
Absolutely

Comments

"[C#] Beginners Tutorial: Creating A Message Box" :: Login/Create an Account :: 2 comments

If you would like to post a comment please signin to your account or register for an account.

MXPosted:

AR15 This was quite an interesting read and I actually learned something from it. Thank you for posting this, man!


No problem, thinking of doing a few more beginner, then intermediate and maybe even a few advanced tutorials.

Tutorial King here we come!

AR15Posted:

This was quite an interesting read and I actually learned something from it. Thank you for posting this, man!