![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Jun 2005
Posts: 10
Rep Power: 0
![]() |
help me with this
In this walkthrough you will build and run a simple Windows Form.
To create a Windows Form Start Visual Studio. Create a Windows Application called HelloWorld. For details, see Creating a Windows Application Project. From the Toolbox, drag a Button control onto the form. Click the button to select it. In the Properties window, set the Text property to "Say Hello". To write the code for your application Double-click the button to add an event handler for the Button1 Click event. The Code Editor will open with the insertion point placed within the event handler. Insert the following code: ' Visual Basic MessageBox.Show ("Hello, World!") // C# MessageBox.Show("Hello, World!"); // C++ MessageBox: how("Hello, World!");To test your application Press F5 to run the application. When your application is running, click the button and verify that "Hello, World!" is shown. Close the Windows Form to return to Visual Studio for some reason it wont work when i press F5....... what exactly is it supposed to be doing ? and by the way i am not sure if this is the right forum.... |
|
|
|
|
|
#2 |
|
Programmer
Join Date: Feb 2005
Location: Limbo
Posts: 39
Rep Power: 0
![]() |
puglover,
This code will pop up a message that says "Hello, World" on it. Assuming that you are doing this in VB.NET, there could be a variety of problems associated with your code. If you are typing in the lines: // C# MessageBox.Show("Hello, World!"); // C++ MessageBox: how("Hello, World!");... then your program will not run. These lines are not to be typed into VB.NET. If this isn't your problem, it would be great if you could post the error message that pops up when you press F5.
__________________
The meek will inherit the earth. -WDaquell |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Jun 2005
Posts: 10
Rep Power: 0
![]() |
It doesn't matter I worked it out but thanks anyways
lol |
|
|
|
|
|
#4 |
|
Professional Programmer
Join Date: Feb 2005
Location: PA, USA
Posts: 254
Rep Power: 4
![]() |
just go in the button's event handler by double clicking it on the designer form and type msgbox(
when you hit the ( intellisense will kick in, the first parameter you can put your string ex: "hello world" and for the second parameter just hit a comma followed by your space bar and it will give you a bunch of different types of message boxes to choose from, pick a simple one like one of the "OK" ones and that should do it. it will look something like this: msgbox("hello world", MsgBoxStyle.OKOnly) i believe that is it, intellisense will correct me if i'm wrong. that's the way i use messageboxes normally, pretty simple and straight forward. good luck!
__________________
I have never let my schooling interfere with my education. -Mark Twain- Xbox live gamertag: melbolt |
|
|
|
|
|
#5 |
|
Troll
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4
![]() |
Be sure to in the future look at the build results. That tells you why it isn't working. Glad to hear it's working.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|