User Profile
Collapse
-
I tried that new code. And when I built my program, I got this error: "Object reference not set to an instance of an object" on "if (e.KeyCode == Keys.Down)". And "OnKeyDown(null );" highlighted in grey. I believe null can't be an argument -
Well, the code needs to work both when the timer ticks and while the down arrow key is pressed.Leave a comment:
-
Okay, thanks. But there is another problem now, I have 2 different methods, one for when the timer triggers, which calls the OnKeyDown method. However, when I use OnKeyDown() it says "No overload for method 'OnKeyDown' takes 0 arguments" and asks me to put an argument in OnKeyDown(), and this must be "KeyEventAr gs e" and I really don't know how to do that. Here's the code:
...Code:private void TimeInterval_Tick(object sender, EventArgs
Leave a comment:
-
-
How can I detect whenever DOWN ARROW Key is pressed?
So, I've been working on a project recently, and the only thing remaining to do is a detector to whenever down arrow key is pressed.
The down arrow key can only trigger when a certain check box is checked and this will have to work with a timer either.
The problem is that I've got no idea how to make the down arrow key press detector(I've got the check box and timer ready tho). Glad if you can help. :) -
Thanks Curtis! I might be new to C#, but I already knew those other 2 replies wouldn't work, so I didn't even try. But you linked me to really what I needed. Many thanks!!Leave a comment:
-
How Can I Make an Object in Form1 Work in Form2?
Hello! I've got a calendar in Form 1 in my code, and buttons in Form2. I need these buttons to send codes for this calendar in Form1. How may I make these work? My friend told me to do a function as a new class, but I'm not sure how can I do this. Glad if you can help :) -
Custom Enum for MessageBox
Hello, recently I've been trying to "play" with MessageBoxes and wondered how may I add custom buttons. A basic MessageBox should look like this:
However, I'd like to know how to create one with Once, Weekly, Monthly, Daily and Cancel, instead of MessageBoxButto ns.Something. I've tried creating an enum and it displayed on the MessageBox,...Code:MessageBox.Show("Message", "Title", MessageBoxButtons.Something);
No activity results to display
Show More
Leave a comment: