I have a general question.
I have a Form where I have some buttoncontrols and 3 textBoxes.

What I do now is to add a "TabControl" and a panel1 on the Form and then I put all the
other controls inside this panel on the "TabControl".
When I now compile the program, the compiler says that redefinitions is made like this:

private: System::Windows::Forms::TabControl^ tabControl1;
private: System::Windows::Forms::TabPage^ tabPage1;
private: System::Windows::Forms:: Panel^ panel1;
private: System::Windows::Forms::TabPage^ tabPage2;
private: System::Windows::Forms::TabControl^ tabControl1;
private: System::Windows::Forms::TabPage^ tabPage1;
private: System::Windows::Forms:: Panel^ panel1;
private: System::Windows::Forms::TabPage^ tabPage2;

If I take the "Duplicates"/redefinitions away above, the code will compile but now I wont see the Form in DesignView. There is an errormessage that says:

A circular control reference has been made. A control cannot be owned by or parented to itself.
I have noticed this problem before also but wonder why this is happening.

I have a problem with my startingForm wich is Form1 in my application. On the form I have 2 panels, 5 buttons 7 labels etc...
What happens now is if I add a control, for example a label wich will be "label8" on my Form, I will have compileerrors.
It seems that I cant add anything more without having compileerrors.
The Errormessage look like below.
I have also tried to declare a label manually in the codeview Excactly like any other label I have with the same result.
I have no clue why this is happening. Is there any bug with my Form1. Is it possible to delete Form1 and create a new one.
I have tried to delete "Form1.cpp", "Form1.h" and "Form1.resX" permanently and created a new Form1 but this does not work. If I do this, I cant see the Form in designView. There is an Error that says "Value does not fall within the expected range". "Show Call Stack" etc...

I have 10 other Forms in my application that doesn´t have this problem.
Thank You!

'label8' : is not a member of 'Form1::Form1'
see declaration of 'Form1::Form1'
left of '->AutoSize' must point to class/struct/union/generic type
left of '->Location' must point to class/struct/union/generic type


.......................................................................................................................................
I also noticed that if I Delete Ex: 20 Emty Lines(Blanc Lines) in the codeView and then change
the View to DesignView, I will not see the DesignView. I will have an Error that says:
"Catastrophic failure (Exception from HRESULT: 0x8000FFF (E_UNEXPECTED))

I have a general question.
I have a Form where I have some buttoncontrols and 3 textBoxes.

What I do now is to add a "TabControl" and a panel1 on the Form and then I put all the
other controls inside this panel on the "TabControl".
When I now compile the program, the compiler says that redefinitions is made like this:

private: System::Windows::Forms::TabControl^ tabControl1;
private: System::Windows::Forms::TabPage^ tabPage1;
private: System::Windows::Forms:: Panel^ panel1;
private: System::Windows::Forms::TabPage^ tabPage2;
private: System::Windows::Forms::TabControl^ tabControl1;
private: System::Windows::Forms::TabPage^ tabPage1;
private: System::Windows::Forms:: Panel^ panel1;
private: System::Windows::Forms::TabPage^ tabPage2;

If I take the "Duplicates"/redefinitions away above, the code will compile but now I wont see the Form in DesignView. There is an errormessage that says:

A circular control reference has been made. A control cannot be owned by or parented to itself.
I have noticed this problem before also but wonder why this is happening.

Hi,

I have the same problem now. Did you allready solve your problem?
Is there some fix for this? I'm using VS2008 . . .

Thx

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.