Question
You became fond of the prank assignment (who wouldn't, right??), so you decided you wanted to get in on the game. As you know, buttons
You became fond of the prank assignment (who wouldn't, right??), so you decided you wanted to get in on the game.
As you know, buttons are supposed to work a particular way: if you press them, they do something meaningful (like a submit button hopefully submits your data somewhere). Because this is a prank, that is not going to happen here.
Design a simple form with a single button that says "Close Form." Here's what should happen with that button:
When you hover over that button, make it change to a color of your choice (emblematic of it being ready to click, only furthering the user's assumption).
When you press the button, make a label appear that says "I refuse to conform to your social norms, but I might if you ask me nicely by clicking the button again ;) "
When you leave the button, display a message box that tells you how many times you clicked the button, saying something to the effect of "You clicked x time(s) before you figured out I wouldn't change my mind". After that box is dismissed, the form closes.
Copy the code from Visual Studio and place it here. Make sure you name things such that I will know what is what. Take note that you need to figure out how many times the button was pressed. Think about how you might do that using an incrementing variable.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started