Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 15th, 2005, 9:24 PM   #1
puglover
Newbie
 
Join Date: Jun 2005
Posts: 10
Rep Power: 0 puglover is on a distinguished road
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....
puglover is offline   Reply With Quote
Old Jun 16th, 2005, 12:55 AM   #2
Wraith Daquell
Programmer
 
Join Date: Feb 2005
Location: Limbo
Posts: 39
Rep Power: 0 Wraith Daquell is on a distinguished road
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
Wraith Daquell is offline   Reply With Quote
Old Jun 16th, 2005, 1:27 AM   #3
puglover
Newbie
 
Join Date: Jun 2005
Posts: 10
Rep Power: 0 puglover is on a distinguished road
It doesn't matter I worked it out but thanks anyways lol
puglover is offline   Reply With Quote
Old Jun 16th, 2005, 1:30 AM   #4
melbolt
Professional Programmer
 
melbolt's Avatar
 
Join Date: Feb 2005
Location: PA, USA
Posts: 254
Rep Power: 4 melbolt is on a distinguished road
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
melbolt is offline   Reply With Quote
Old Jun 16th, 2005, 2:20 AM   #5
Dameon
Troll
 
Dameon's Avatar
 
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4 Dameon is on a distinguished road
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
Dameon is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:53 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC