I get an error when I try to give this button a na ction of showing a new form. It says:
"error C2039: 'poeni' : is not a member of 'IgraBobi'". But this "poeni" form IS a member of the "IgraBobi" solution. I added it correctly, why doesn't it recognize it...

[
private: System::Void button2_Click_2(System::Object^  sender, System::EventArgs^  e) {
System::Windows::Forms::Form^ Tocni = gcnew IgraBobi::poeni;
Tocni->ShowDialog();
}
]

Edited 3 Years Ago by happygeek: fixed formatting

First of all, if you haven't, try adding

#include "poeni.h"

at the top of the 'Tocni' file, and instead of

System::Windows::Forms::Form^ Tocni = gcnew IgraBobi::poeni;

(I'm guessing you're trying to show "poeni" from "Tocni", or maybe the other way round, I dont know)
use this:

poeni^ Tocni = gcnew poeni;

Tocni->ShowDialog();

if the error still occurs, I have to suggest re-adding the form into the application.

Good luck, let me know if it works!

This question has already been answered. Start a new discussion instead.