i tried to open another form from the solution when i clicked a button, but i cannot make it work, the errors are;

Error	3	error C2061: syntax error : identifier 'ayarlar'	c:\documents and settings\administrator\desktop\develop_dersane\etud\Form1.h	211
Error	2	error C2065: 'ayar' : undeclared identifier	c:\documents and settings\administrator\desktop\develop_dersane\etud\Form1.h	211
Error	4	error C2065: 'ayar' : undeclared identifier	c:\documents and settings\administrator\desktop\develop_dersane\etud\Form1.h	212
Error	7	error C2065: 'ayar' : undeclared identifier	c:\documents and settings\administrator\desktop\develop_dersane\etud\Form1.h	213
Error	1	error C2065: 'ayarlar' : undeclared identifier	c:\documents and settings\administrator\desktop\develop_dersane\etud\Form1.h	211
Error	5	error C2227: left of '->set' must point to class/struct/union/generic type	c:\documents and settings\administrator\desktop\develop_dersane\etud\Form1.h	212
Error	8	error C2227: left of '->Show' must point to class/struct/union/generic type	c:\documents and settings\administrator\desktop\develop_dersane\etud\Form1.h	213
Error	6	error C2232: '->System::Windows::Forms::Form::Owner::set' : left operand has '' type, use '.'	c:\documents and settings\administrator\desktop\develop_dersane\etud\Form1.h	212

and the code is;

private: System::Void button11_Click(System::Object^  sender, System::EventArgs^  e) {
			
			ayarlar ^ayar = gcnew ayarlar;
			ayar->Owner::set(this);
			ayar->Show();
		   }

i need some very simple advice i guess :)

Recommended Answers

All 6 Replies

Can you show declaration of ayarlar class?

how can i do that? i think i have done it wrong. because i have just right clicked to the solution, added new windows forms application, and named it "ayarlar". i think there is something wrong or incomplete

did you add a new windows form or a windows form application (project)?

i added a new windows form, not another project, and it did appeared inside my project as a new header file, ayarlar.h

It's very simple..Just add this..

#include "Form2.h" // or whatever

thanks :D

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.