Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7956827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:06:34+00:00 2026-06-04T04:06:34+00:00

everybody. :) Totally new to C# right now, so I apologize for the probable

  • 0

everybody. 🙂

Totally new to C# right now, so I apologize for the probable idiocy of this question. 😛 I’ve done quite a bit of searching over the past couple of hours and not been able to find anything that has solved my issue, unfortunately.

I’ve been running through some basic C# guides, and I’m going through the creation of a simple Windows Form Application with a button that, when clicked, displays a MessageBox with a short phrase in it. Oddly, though, when I debug the app and click the button, nothing happens. In my searches, I’ve seen many situations where people have the MessageBox show with no text; in this situation, however, absolutely nothing is happening. It acts as though there is no action being applied whatsoever.

I’m using VSC# 2010 Express. I tried this with fresh projects and installs on both my Windows 7 machine and my XP machine, same results on both.

Thanks for your help! Code pasted below.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Here's a message??");
        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:06:35+00:00Added an answer on June 4, 2026 at 4:06 am

    Hook button1_click Event Handler to the Click Event of your Button

        public Form1()
        {
            InitializeComponent();
            button1.Click += new EventHandler(button1_Click); 
            //add above line
        }
    
        private void button1_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Here's a message??");
        }
    

    What was happening was that you just wrote your event coding but there was no call for it.

    With this line button1.Click += new EventHandler(button1_Click); when click happens it will execute private void button1_Click(object sender, EventArgs e) function.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

everybody! I have a simple question. What does this line do? trap exec 1>&6
everybody, this is my question: i have a UILabel that displays the hour with
I everybody, I have qustioned this question already in that post: center flash element
everybody! I have a new question about Kohana 3, or rather about a module
everybody! Could I ask you to help me to decode this JSON code: $json
Hi everybody I'm new and I'm having some trouble with a connection with netbeans
Hi everybody and thanks for your time, I read filenames in a QList. This
everybody. I am entirely new to the topic of classification algorithms, and need a
Hi everybody: let me do a bit of concept mining here: I am involved
Everybody's seen this before, but what is this code? I don't even know what

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.