0

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 by happygeek: fixed formatting

2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by Wiki_Tiki
1

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.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.