Título: Redireccionar a otro winform C++/CLI Error Constructor
Publicado por: Guillito en 26 Agosto 2021, 05:14 am
Hola, molesto nuevamente........Me sale este error cuando quiero programar el segundo Boton para redireccionar o llamar a oro Form.....seria el unico a saldria.... Error 1 error C3673: 'Cualquiera::Form2' : la clase no tiene un constructor de copia #pragma once #include "Form2.h"
namespace Cualquiera {
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> /// Resumen de Form1 /// /// ADVERTENCIA: si cambia el nombre de esta clase, deberá cambiar la /// propiedad 'Nombre de archivos de recursos' de la herramienta de compilación de recursos administrados /// asociada con todos los archivos .resx de los que depende esta clase. De lo contrario, /// los diseñadores no podrán interactuar correctamente con los /// recursos adaptados asociados con este formulario. /// </summary> public ref class Form1 : public System::Windows::Forms::Form { public: Form1(void) { InitializeComponent(); // //TODO: agregar código de constructor aquí // }
protected: /// <summary> /// Limpiar los recursos que se estén utilizando. /// </summary> ~Form1() { if (components) { delete components; } } private: System::Windows::Forms::Button^ Guardar1; protected:
protected:
private: System::Windows::Forms::Label^ label1; private: System::Windows::Forms::Label^ label2; private: System::Windows::Forms::Button^ button2;
private: /// <summary> /// Variable del diseñador requerida. /// </summary> System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code /// <summary> /// Método necesario para admitir el Diseñador. No se puede modificar /// el contenido del método con el editor de código. /// </summary> void InitializeComponent(void) { this->Guardar1 = (gcnew System::Windows::Forms::Button()); this->label1 = (gcnew System::Windows::Forms::Label()); this->label2 = (gcnew System::Windows::Forms::Label()); this->button2 = (gcnew System::Windows::Forms::Button()); this->SuspendLayout(); // // Guardar1 // this->Guardar1->BackColor = System::Drawing::SystemColors::ActiveCaption; this->Guardar1->ForeColor = System::Drawing::SystemColors::ControlText; this->Guardar1->Location = System::Drawing::Point(95, 73); this->Guardar1->Name = L"Guardar1"; this->Guardar1->Size = System::Drawing::Size(75, 23); this->Guardar1->TabIndex = 0; this->Guardar1->Text = L"Click Aquí"; this->Guardar1->UseVisualStyleBackColor = false; this->Guardar1->Click += gcnew System::EventHandler(this, &Form1::button1_Click); // // label1 // this->label1->Enabled = false; this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->label1->ForeColor = System::Drawing::SystemColors::ControlText; this->label1->Location = System::Drawing::Point(60, 117); this->label1->Name = L"label1"; this->label1->Size = System::Drawing::Size(157, 23); this->label1->TabIndex = 0; // // label2 // this->label2->AutoSize = true; this->label2->Font = (gcnew System::Drawing::Font(L"Open Sans Semibold", 8.25F, static_cast<System::Drawing::FontStyle>((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Italic)), System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0))); this->label2->Location = System::Drawing::Point(61, 33); this->label2->Name = L"label2"; this->label2->Size = System::Drawing::Size(167, 15); this->label2->TabIndex = 1; this->label2->Text = L"Por favor, Haga Click en Botón"; // // button2 // this->button2->BackColor = System::Drawing::SystemColors::ActiveCaption; this->button2->ForeColor = System::Drawing::SystemColors::ControlText; this->button2->Location = System::Drawing::Point(95, 193); this->button2->Name = L"button2"; this->button2->Size = System::Drawing::Size(75, 23); this->button2->TabIndex = 2; this->button2->Text = L"Continuar"; this->button2->UseVisualStyleBackColor = false; this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click); // // Form1 // this->AutoScaleDimensions = System::Drawing::SizeF(6, 13); this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; this->ClientSize = System::Drawing::Size(284, 262); this->Controls->Add(this->button2); this->Controls->Add(this->label2); this->Controls->Add(this->label1); this->Controls->Add(this->Guardar1); this->Name = L"Form1"; this->Text = L"Label Hola Mundo"; this->ResumeLayout(false); this->PerformLayout();
} private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { label1->Text = "Hola Mundo"; }
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
Form2^ frm2 = gcnew Form2(this); frm2->Show(); this->Hide(); } }; }
Agradezco cualquier ayuda....
Título: Re: Redireccionar a otro winform C++/CLI Error Constructor
Publicado por: Eternal Idol en 26 Agosto 2021, 21:49 pm
https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-2/compiler-error-c3673?view=msvc-160
El constructor estaba incluido en el enlace que te deje. En el futuro si tenes errores pone el numero de linea y/o resaltala, seguro que te podremos ayudar mejor sin tener que adivinar.
Título: Re: Redireccionar a otro winform C++/CLI Error Constructor
Publicado por: Guillito en 29 Agosto 2021, 22:51 pm
Sii, disculpas, mil millones gracias, tendre en cuenta ello.....saludos cordiales
|