samedi 28 février 2015

InitialisingComponent Error being thrown (Visual Studio C#)

I have asked this question a couple of days ago and really did not get any help on it. So i am going to re-ask the question in a more better sense. I am doing a fully automated speech recognition program. I have the program complete but one error. This error happens to be the InitializingComponent(). see code below:





public frmMain()
{
InitializeComponent();



in the program i have 2 winforms (using C#) that uses the same events and methods. Once i do the Form frmEdit, I then can change the class name to all the same for example this is the breakdown:


public partial class frmMain : Form public partial class AlarmClock : Form public partial class Commands : Form


ok i originally changed Form1 : Form to frmMain : Form. this form contains all the events, methods, constructors etc., etc.,


With the Form Edit option i can edit the form names. So i changed the other two with the same public partial class name. So now all three are frmMain : Form.


However i have no errors anywhere in the program except this error that is on the frmMain (Form1) and the error says:


Error 1 The call is ambiguous between the following methods or properties: 'Ivan.frmMain.InitializeComponent()' and 'Ivan.frmMain.InitializeComponent()' C:\Users\Ian\Desktop\Ivan Assistant\Ivan\Ivan\Form1.cs


I have pasted the exact error. So i have done this program before, then scratched it and started over and so forth.


What do i need to do to correct this error. If you need to see more code then i can make a video and post it on youtube for you to see. I really don't want to start all over again but that is neither there nor here. This program is eventually going to be going out for testing once i can get this error resolved and see if it will debug.


This is about as plain as i can explain this with out the ability to post pictures at the moment. But like i said i can do a video and explain what i am doing. If that would help anyone.


Aucun commentaire:

Enregistrer un commentaire