Re: Declaration of office
zapisListBox1 is Form1 class method, and not global function. You need to call it having Form1 instance reference.
Re: Declaration of office
Quote:
Originally Posted by
Alex F
zapisListBox1 is Form1 class method, and not global function. You need to call it having Form1 instance reference.
You mean like this? but it throws me an error too.
Form1::zapisListBox1(i, DVS.Serial[i], DVS.Version[i]);
error:
.\Motory_2.cpp(53) : error C3767: 'Motory_2::Form1::zapisListBox1': candidate function(s) not accessible
Re: Declaration of office
No, you need Form1 instance for this. It looks like you started to work with C++/CLI without C++ experience. I suggest you to learn C++ first.
In Motory.cpp you need to have variable of type Form1^, which must be initialized to existing Form1 reference. Having this reference, you can call class methods. I cannot show exactly how to do this, because I don't know your program structure.
Re: Declaration of office
Quote:
Originally Posted by
Alex F
No, you need Form1 instance for this. It looks like you started to work with C++/CLI without C++ experience. I suggest you to learn C++ first.
In Motory.cpp you need to have variable of type Form1^, which must be initialized to existing Form1 reference. Having this reference, you can call class methods. I cannot show exactly how to do this, because I don't know your program structure.
How do I create a global pointer to Form1, which provide access to its methods?
I tried: public: System:: Windows:: Forms:: Form ^ Fun;
Re: Declaration of office
To Alex F Thank you very much... This problem is sort out.