[C# - Tutorial] Creating A MessageBox. menu

Shout-Out

User Tag List

Results 1 to 4 of 4
  1. #1
    JesperKladden's Avatar Member
    Reputation
    3
    Join Date
    Jul 2008
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [C# - Tutorial] Creating A MessageBox.

    For the first, you need to create a form using your C# (I prefer Microsoft Visual C# 200. VC# Can be downloaded here; Visual C# 2008 Express Edition
    Click Ctrl+Shift+N, write in the bottom "MessageBoxTEST", after that, click like it says in the picture:







    In that form, you place a button (using the toolbox), it says how on the picture.



    Right-click the button and select properties, then scroll down where it says "Text". Write "RoflBox" there.



    Now, here comes the coding..

    Double click on the button called "roflbox", when you've made that, it appears a big document where it is some text, no matter of that text. Just write as I say under the following :
    Code:
    		 private void button1_Click(object sender, EventArgs e)
    		{
    Now, write this:
    Code:
    MessageBox.Show("I like RoflCopters");
    Also, If you want (I just came up with it now) you can write
    Code:
    MessageBox.Show("I like RoflCopters", "RoflCopter");
    That code will make the messagebox use a title (I think that is the right code for it).


    This should look like this:




    Now, player around a little with the gui so it looks pretty good. Then push F5. The builder should debug the program so the form arrives, now. Push the button and this should come up:




    You have successfully made a program in C#, now go away and say this to your friends and say that they can't do it XD

    [C# - Tutorial] Creating A MessageBox.
  2. #2
    Syllabus's Avatar Banned
    Reputation
    22
    Join Date
    Nov 2007
    Posts
    77
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cool guide, but should maybe been in programming section?+Rep

  3. #3
    JesperKladden's Avatar Member
    Reputation
    3
    Join Date
    Jul 2008
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know, I didn't see it before xD

  4. #4
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Decent guide for beginners, however you should try to stay CLR compliant, and keep up with MS standards.

    Code:
    MessageBox.Show("Your Body Text Here", "Your Header Text", MessageBoxButton.OK, MessageBoxIcon.Info);
    That will make sure you don't have any localization errors in your program. (Some locales see a "Cancel" button over the default "OK")

Similar Threads

  1. [REQUEST TUTORIAL] create new classes / races
    By kevinjoha in forum WoW ME Questions and Requests
    Replies: 6
    Last Post: 01-02-2011, 03:13 AM
  2. [Tutorial] Create Custom Macro Icons
    By Pawaox-Z in forum World of Warcraft Guides
    Replies: 34
    Last Post: 09-21-2008, 04:21 PM
  3. [Tutorial+"Create yourself"-AutoIt program] Login Manager.
    By Thidan in forum World of Warcraft Bots and Programs
    Replies: 4
    Last Post: 07-26-2008, 05:14 PM
  4. [Tutorial] creating your own quests
    By damon160 in forum WoW EMU Guides & Tutorials
    Replies: 1
    Last Post: 11-11-2007, 04:14 PM
  5. Tutorial: Creating an animated avatar... just like blizzard staff.
    By marick626 in forum Art & Graphic Design
    Replies: 23
    Last Post: 07-12-2007, 02:42 PM
All times are GMT -5. The time now is 06:43 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search