Im stuck on a bit of code which I am re creating from a reference code given to me by my teacher.

I have the following line that is giving me 6 errors:

this->Load += gcnew System::EventHandler(this, &EditWaveTrack_form1::EditWaveTrack_form1_Load);
Error	1	error C2039: 'EditWaveTrack_form1_Load' : is not a member of 'WaveMachine::EditWaveTrack_form1'	c:\users\black chocobo\desktop\wavemachine\managesongs\wavemachine\wavemachine\wavemachine\EditWaveTrack_form1.h	192
Error	2	error C2065: 'EditWaveTrack_form1_Load' : undeclared identifier	c:\users\black chocobo\desktop\wavemachine\managesongs\wavemachine\wavemachine\wavemachine\EditWaveTrack_form1.h	192
Error	3	error C3350: 'System::EventHandler' : a delegate constructor expects 2 argument(s)	c:\users\black chocobo\desktop\wavemachine\managesongs\wavemachine\wavemachine\wavemachine\EditWaveTrack_form1.h	192
Error	4	error C2039: 'EditWaveTrack_form1_Load' : is not a member of 'WaveMachine::EditWaveTrack_form1'	c:\users\black chocobo\desktop\wavemachine\managesongs\wavemachine\wavemachine\wavemachine\EditWaveTrack_form1.h	192
Error	5	error C2065: 'EditWaveTrack_form1_Load' : undeclared identifier	c:\users\black chocobo\desktop\wavemachine\managesongs\wavemachine\wavemachine\wavemachine\EditWaveTrack_form1.h	192
Error	6	error C3350: 'System::EventHandler' : a delegate constructor expects 2 argument(s)	c:\users\black chocobo\desktop\wavemachine\managesongs\wavemachine\wavemachine\wavemachine\EditWaveTrack_form1.h	192

Can anyone help me understand what I am doing wrong?

Don't type in your event handlers by hand, the IDE provides a mechanism. If you really want to do it by yourself, let the IDE do one and watch where it places the code. Go to the form designer, select your form. On the right hand side there is a window where it has all of the forms properties (title, etc). Click on the lightning bolt at the top of that window. Go down to Load and double click the cell to the right of it. You'll need to fill in the method that has been generated (or perhaps copy/paste the code from the one you generated by hand), but the handler code will be in the right spot in Form1.h.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.