0

请问有人可以帮我吗?我正在做一个项目,我一直在尝试传递一个值(字符串)以在运行时显示在标签上,标签是一种形式,但我希望我的代码采用不同的形式。在 Visual Studio 2010 中使用 Visual C++。谢谢。我已经尝试将组件(即标签)添加到第二种形式:

this->Controls->Add(sform->usernamelabel);
this->usernamelabel->Text=activeuser;

然后尝试将值传递给标签,但没有成功,因为它给了我一个错误通知Error 1 error C2039: 'usernamelabel' : is not a member of 'secproj::Form1' c:\users\rasheed .a.o\documents\visual studio 2010\projects\secproj\secproj\Form1.h 204 1 secproj.

4

0 回答 0