User Profile

Collapse

Profile Sidebar

Collapse
Dr Cake
Dr Cake
Last Activity: Jun 26 '12, 08:17 PM
Joined: May 12 '12
Location: Valença, RJ, Brazil
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • 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
    See more | Go to post
    Last edited by Dr Cake; Jun 5 '12, 05:00 PM. Reason: Editted to add some more details.

    Leave a comment:


  • Well, the code needs to work both when the timer ticks and while the down arrow key is pressed.
    See more | Go to post

    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
    ...
    See more | Go to post

    Leave a comment:


  • I'm trying to do this using Windows Forms....
    See more | Go to post

    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. :)
    See more | Go to post

  • 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!!
    See more | Go to post

    Leave a comment:


  • Dr Cake
    started a topic How Can I Make an Object in Form1 Work in Form2?

    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 :)
    See more | Go to post

  • Dr Cake
    started a topic Custom Enum for MessageBox

    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:
    Code:
    MessageBox.Show("Message", "Title", MessageBoxButtons.Something);
    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,...
    See more | Go to post
No activity results to display
Show More
Working...