Thread: Re-Starting Button37_Click

  1. #1
    Registered User
    Join Date
    Feb 2006
    Posts
    5

    Re-Starting Button37_Click

    Alright, so I am working on Visual C++ 2005 express edition... and I got a lil problem, im trying to make a command that re-start the button 37_click if hasstarted=0... (when its fixed, of course it will be something bigger, this is just to test if it work), here is the code:

    Code:
    private: System::Void button37_Click(System::Object^  sender, System::EventArgs^  e) 
    		 {
    			 if (textBox1->Text != "")
    			 {
    				 if (hasstarted==1)
    				 {
    					 textBox1->Text = "Test";
    				 }
    				 else
    				 {
    					 hasstarted=1;
    					 System::EventHandler(this, =&Form1::button37_Click);
    				 }
    			 }
    		 }
    Now the problem is this, when I compile it show this msg:
    1>c:\documents and settings\shock\desktop\התיקיה של אורי\projects\shock -- charmed quiz\shock -- charmed quiz\Form1.h(4964) : error C3374: can't take address of 'ShOcKCharmedQuiz::Form1::button37_Click' unless creating delegate instance

    And I was wondering if anyone can help me...

    Cheers.

  2. #2
    Registered User
    Join Date
    Feb 2006
    Posts
    5
    My bad, I forgot to note I use Windows Forms.

  3. #3
    Registered User
    Join Date
    Apr 2003
    Posts
    2,663
    My bad, I forgot to note I use Windows Forms.
    Maybe try a Window's Forms forum?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Starting programs
    By Molokai in forum C Programming
    Replies: 1
    Last Post: 04-16-2009, 10:10 AM
  2. Replies: 9
    Last Post: 03-20-2009, 05:22 PM
  3. Interpreter.c
    By moussa in forum C Programming
    Replies: 4
    Last Post: 05-28-2008, 05:59 PM
  4. i am not able to figure ot the starting point of this
    By youngashish in forum C++ Programming
    Replies: 7
    Last Post: 10-07-2004, 02:41 AM
  5. question about reading inputs starting with 0
    By jibbles in forum C Programming
    Replies: 8
    Last Post: 08-09-2004, 03:27 AM