Winforms 从另一个赢形式调用一个赢形式 我使用托管C++构建了2个Win窗体。按下一个按钮,另一个表单(login.h)应该从Client.h打开,但我得到了类似“error C3673:'SenderApp::login':类没有副本构造函数”的错误

Winforms 从另一个赢形式调用一个赢形式 我使用托管C++构建了2个Win窗体。按下一个按钮,另一个表单(login.h)应该从Client.h打开,但我得到了类似“error C3673:'SenderApp::login':类没有副本构造函数”的错误,winforms,visual-c++,Winforms,Visual C++,以下是登录名.h代码: #pragma once namespace SenderApp { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using

以下是登录名.h代码:

#pragma once

namespace SenderApp {

    using namespace System;
    using namespace System::ComponentModel;
    using namespace System::Collections;
    using namespace System::Windows::Forms;
    using namespace System::Data;
    using namespace System::Drawing;

    /// <summary>
    /// Summary for Login
    /// </summary>
    public ref class Login : public System::Windows::Forms::Form
    {
    public:
        Login(void)
        {
            InitializeComponent();
            //
            //TODO: Add the constructor code here
            //
        }

    protected:
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        ~Login()
        {
            if (components)
            {
                delete components;
            }
        }
    private: System::Windows::Forms::Label^  label1;
    private: System::Windows::Forms::Label^  label2;
    private: System::Windows::Forms::Label^  label3;
    private: System::Windows::Forms::TextBox^  textBox1;
    private: System::Windows::Forms::TextBox^  textBox2;
    private: System::Windows::Forms::Button^  button1;
    private: System::Windows::Forms::Button^  button2;
    private: System::Windows::Forms::Label^  label4;
    protected: 

    private:
        /// <summary>
        /// Required designer variable.
        /// </summary>
        System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        void InitializeComponent(void)
        {
            this->label1 = (gcnew System::Windows::Forms::Label());
            this->label2 = (gcnew System::Windows::Forms::Label());
            this->label3 = (gcnew System::Windows::Forms::Label());
            this->textBox1 = (gcnew System::Windows::Forms::TextBox());
            this->textBox2 = (gcnew System::Windows::Forms::TextBox());
            this->button1 = (gcnew System::Windows::Forms::Button());
            this->button2 = (gcnew System::Windows::Forms::Button());
            this->label4 = (gcnew System::Windows::Forms::Label());
            this->SuspendLayout();
            // 
            // label1
            // 
            this->label1->AutoSize = true;
            this->label1->Location = System::Drawing::Point(12, 111);
            this->label1->Name = L"label1";
            this->label1->Size = System::Drawing::Size(60, 13);
            this->label1->TabIndex = 0;
            this->label1->Text = L"User Name";
            // 
            // label2
            // 
            this->label2->AutoSize = true;
            this->label2->Location = System::Drawing::Point(136, 21);
            this->label2->Name = L"label2";
            this->label2->Size = System::Drawing::Size(58, 13);
            this->label2->TabIndex = 1;
            this->label2->Text = L"User Login";
            this->label2->Click += gcnew System::EventHandler(this, &Login::label2_Click);
            // 
            // label3
            // 
            this->label3->AutoSize = true;
            this->label3->Location = System::Drawing::Point(12, 157);
            this->label3->Name = L"label3";
            this->label3->Size = System::Drawing::Size(53, 13);
            this->label3->TabIndex = 2;
            this->label3->Text = L"Password";
            this->label3->Click += gcnew System::EventHandler(this, &Login::label3_Click);
            // 
            // textBox1
            // 
            this->textBox1->Location = System::Drawing::Point(91, 108);
            this->textBox1->Name = L"textBox1";
            this->textBox1->Size = System::Drawing::Size(181, 20);
            this->textBox1->TabIndex = 3;
            // 
            // textBox2
            // 
            this->textBox2->Location = System::Drawing::Point(91, 154);
            this->textBox2->Name = L"textBox2";
            this->textBox2->Size = System::Drawing::Size(181, 20);
            this->textBox2->TabIndex = 4;
            this->textBox2->TextChanged += gcnew System::EventHandler(this, &Login::textBox2_TextChanged);
            // 
            // button1
            // 
            this->button1->Location = System::Drawing::Point(63, 212);
            this->button1->Name = L"button1";
            this->button1->Size = System::Drawing::Size(75, 23);
            this->button1->TabIndex = 5;
            this->button1->Text = L"Submit";
            this->button1->UseVisualStyleBackColor = true;
            // 
            // button2
            // 
            this->button2->Location = System::Drawing::Point(197, 212);
            this->button2->Name = L"button2";
            this->button2->Size = System::Drawing::Size(75, 23);
            this->button2->TabIndex = 6;
            this->button2->Text = L"Cancel";
            this->button2->UseVisualStyleBackColor = true;
            // 
            // label4
            // 
            this->label4->AutoSize = true;
            this->label4->Location = System::Drawing::Point(12, 59);
            this->label4->Name = L"label4";
            this->label4->Size = System::Drawing::Size(303, 13);
            this->label4->TabIndex = 7;
            this->label4->Text = L"[Please use the pre-defined logins in login.xml at C:\\Repository]";
            this->label4->Click += gcnew System::EventHandler(this, &Login::label4_Click);
            // 
            // Login
            // 
            this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
            this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
            this->ClientSize = System::Drawing::Size(339, 267);
            this->Controls->Add(this->label4);
            this->Controls->Add(this->button2);
            this->Controls->Add(this->button1);
            this->Controls->Add(this->textBox2);
            this->Controls->Add(this->textBox1);
            this->Controls->Add(this->label3);
            this->Controls->Add(this->label2);
            this->Controls->Add(this->label1);
            this->Name = L"Login";
            this->Text = L"Login";
            this->ResumeLayout(false);
            this->PerformLayout();

        }
#pragma endregion
    private: System::Void label2_Click(System::Object^  sender, System::EventArgs^  e) {
             }
    private: System::Void label3_Click(System::Object^  sender, System::EventArgs^  e) {
             }
    private: System::Void textBox2_TextChanged(System::Object^  sender, System::EventArgs^  e) {
             }
private: System::Void label4_Click(System::Object^  sender, System::EventArgs^  e) {
         }
};
}
#pragma一次
名称空间SenderApp{
使用名称空间系统;
使用名称空间System::ComponentModel;
使用名称空间系统::集合;
使用命名空间System::Windows::Forms;
使用名称空间System::Data;
使用名称空间系统::绘图;
/// 
///登录摘要
/// 
public ref类登录:public System::Windows::Forms::Form
{
公众:
登录(无效)
{
初始化组件();
//
//TODO:在此处添加构造函数代码
//
}
受保护的:
/// 
///清理所有正在使用的资源。
/// 
~Login()
{
if(组件)
{
删除组件;
}
}
私有:系统::Windows::窗体::标签^label1;
私有:系统::Windows::窗体::标签^label2;
私有:系统::Windows::窗体::标签^label3;
private:System::Windows::Forms::TextBox^textBox1;
private:System::Windows::Forms::TextBox^textBox2;
私有:系统::Windows::窗体::按钮^button1;
私有:系统::Windows::窗体::按钮^button2;
私有:系统::Windows::窗体::标签^label4;
受保护的:
私人:
/// 
///必需的设计器变量。
/// 
系统::组件模型::容器^组件;
#pragma区域Windows窗体设计器生成的代码
/// 
///设计器支持所需的方法-不修改
///此方法的内容与代码编辑器一起使用。
/// 
void初始化组件(void)
{
这->标签1=(gcnewsystem::Windows::Forms::Label());
这->label2=(gcnewsystem::Windows::Forms::Label());
这->label3=(gcnewsystem::Windows::Forms::Label());
这->textBox1=(gcnewsystem::Windows::Forms::TextBox());
这->textBox2=(gcnewsystem::Windows::Forms::TextBox());
此->按钮1=(gcnew System::Windows::Forms::Button());
此->按钮2=(gcnew System::Windows::Forms::Button());
这->label4=(gcnewsystem::Windows::Forms::Label());
此->SuspendLayout();
// 
//标签1
// 
此->标签1->自动调整大小=真;
这个->标签1->位置=系统::图纸::点(12111);
此->标签1->名称=L“标签1”;
该->标签1->尺寸=系统::图纸::尺寸(60,13);
此->标签1->选项卡索引=0;
此->标签1->文本=L“用户名”;
// 
//标签2
// 
此->标签2->自动调整大小=真;
这个->标签2->位置=系统::绘图::点(136,21);
此->label2->名称=L“label2”;
这个->标签2->尺寸=系统::图纸::尺寸(58,13);
此->标签2->选项卡索引=1;
此->标签2->文本=L“用户登录”;
this->label2->Click+=gcnewsystem::EventHandler(this,&Login::label2\u Click);
// 
//标签3
// 
此->标签3->自动调整大小=真;
这个->标签3->位置=系统::图纸::点(12157);
此->标签3->名称=L“标签3”;
该->标签3->尺寸=系统::图纸::尺寸(53,13);
此->标签3->选项卡索引=2;
此->标签3->文本=L“密码”;
this->label3->Click+=gcnewsystem::EventHandler(this,&Login::label3\u Click);
// 
//文本框1
// 
此->文本框1->位置=系统::绘图::点(91108);
此->textBox1->Name=L“textBox1”;
该->文本框1->尺寸=系统::图纸::尺寸(181,20);
此->文本框1->选项卡索引=3;
// 
//文本框2
// 
此->文本框2->位置=系统::绘图::点(91154);
此->textBox2->Name=L“textBox2”;
这->文本框2->尺寸=系统::图纸::尺寸(181,20);
此->文本框2->选项卡索引=4;
this->textBox2->TextChanged+=gcnew System::EventHandler(this,&Login::textBox2\u TextChanged);
// 
//按钮1
// 
此->按钮1->位置=系统::图纸::点(63212);
此->按钮1->名称=L“按钮1”;
该->按钮1->尺寸=系统::图纸::尺寸(75,23);
此->按钮1->选项卡索引=5;
此->按钮1->Text=L“提交”;
此->按钮1->UseVisualStyleBackColor=true;
// 
//按钮2
// 
此->按钮2->位置=系统::图纸::点(197212);
此->按钮2->名称=L“按钮2”;
该->按钮2->尺寸=系统::图纸::尺寸(75,23);
此->按钮2->选项卡索引=6;
此->按钮2->文本=L“取消”;
此->按钮2->UseVisualStyleBackColor=true;
// 
//标签4
// 
此->标签4->自动调整大小=真;
该->标签4->位置=系统::图纸::点(12,59);
此->label4->名称=L“label4”;
该->标签4->尺寸=系统::图纸::尺寸(303,13);
该->标签4->选项卡索引=7;
此->标签4->Text=L“[请使用C:\\Repository中login.xml中预定义的登录名]”;
this->label4->Click+=gcnewsystem::EventHandler(this,&Login::label4\u Click);
// 
//登录
// 
这->自动缩放尺寸=系统::图纸::尺寸(6,13);
这->AutoScaleMode=System::Windows::Forms::AutoScaleMode::Font;
这->ClientSize=System::Drawing::Size(339267);
Login^ lgn = gcnew Login();
lgn->Show();