Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hello World
Message
De
31/07/2009 13:50:08
 
 
À
31/07/2009 13:28:16
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
MS SQL Server
Divers
Thread ID:
01415697
Message ID:
01415699
Vues:
83
>I have a form with a single button on it. In the click event i have the following code: MessageBox.Show("Hello, World!");
>
>The code does not work. How do I get my application to say hello?

Works for me. (without the semicolon - VB )

What does "Does not work" mean? Nothing happens, error ? I assume it compiles okay or you couldn't run the form

Another possiblity is you renamed the button but and the click method but not the handler on that first line of the method at the end. Easiest thing is double-click the button and that gives you handler code.
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        MessageBox.Show("Hello world")
    End Sub
.


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform