My first C# forms application.

Raziaar

I Hate Custom Titles
Joined
Sep 13, 2003
Messages
29,769
Reaction score
140
After experimenting a lot and really sort of feeling through the dark, here is my first C# forms application! I have only minutely touched on the forms chapter in the book I'm learning from. So everything is basically me figuring out how to do it on my own!

A little program inspired me on this one. I'm sure you know the one.

NOTE: The executable file is 100% safe! I made it myself.
 

Attachments

  • Questionaire.zip
    16.5 KB · Views: 69
hehehe apparently i "cheated" .. :p. nice work its good to see you have a reasonable understanding of how to capture and handle mouse events stuff like that usually flies right over people.
 
What I want to know... is there another way to swap the no and yes? I couldn't do it with two simple commands, so I made three... First I created an invisible filler object.

Then on the mouseover of the no button, I told the filler to assume the location of the no button, the no button to assume the location of the yes button, and the yes button to assume the location of the filler.

I also learned a lot of other things, including how to imbed sounds and play those sounds and much more.

As for the Cheaters... yes, I anticipated you ;)
 
well im guessing you have 2 seperate functions assigned to the click events , what you could do is assign one function and then check the object id. im going to post a small example.
edit:here you go

Code:
        private void button1_Click(object sender, EventArgs e)
        {
            string obj = sender.ToString();

            if (obj.EndsWith("button1"))
            {
                //code for button1 .. possible reference to another function...
            }
            else if (obj.EndsWith("button2"))
            {
                //code for button 2....
            }
        }
so you basically assign this function to both buttons and handle the objects through the if statements.
 
you can even change the button's click event handler using this.buttonname.click = blah blah blah.
 
The application failed to initialize properly.

Hmm... Well You probably need .net framework 2.0

I can't imagine anything else you'd need. Who plays games these days and doesn't have 2.0 installed?

Don't download it on my account though. The program isn't worth it. heh.
 
Back
Top