|
Mostrar Mensajes
|
Páginas: [1] 2 3 4
|
1
|
Programación / Programación C/C++ / Aclaracion o explicacion
|
en: 31 Agosto 2021, 16:19 pm
|
Hola, molesto de nuevo ya que recien empiezo con c++/cli.......
Podrían Uds aclarame o explicarme más fehacientemente que significa esto que publico más abajo??....yo le doy una interpretación, pero quiero asegurarme bien ello....
Agradezco, un beso grande....
"El símbolo de intercalación (“^ ") indica que la variable declarada es un identificador para un objeto administrado de C++/CLI."
|
|
|
2
|
Foros Generales / Dudas Generales / Error C++ Raro
|
en: 29 Agosto 2021, 23:44 pm
|
Hola, implemento una interfaz que sume, pero da error que dice que se solucionaria compilando de nuevo.... Dejo ERROR codigo....Agradezco lo que puedan audarme, es para clases para mis alumnos... 1>.\AssemblyInfo.cpp(1) : fatal error C1859: Error inesperado 'Debug\OperacionesArits.pch' del encabezado precompilado; puede que el problema se resuelva si vuelve a ejecutar el compilador 1>OperacionesArits.cpp 1>.\OperacionesArits.cpp(3) : fatal error C1859: Error inesperado 'Debug\OperacionesArits.pch' del encabezado precompilado; puede que el problema se resuelva si vuelve a ejecutar el compilador 1>Generando código... 1>El registro de compilación se guardó en el "file://c:\Users\Guillermo\Documents\Visual Studio 2008\Projects\OperacionesArits\OperacionesArits\Debug\BuildLog.htm" 1>OperacionesArits - 2 errores, 0 advertencias ========== Generar: 0 correctos, 1 incorrectos, 0 actualizados, 0 omitidos ========== Codigo #pragma endregion private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { int Num1, Num2, Res; Num1 = System::Convert::ToInt32(textPrim -> Text); Num2 = System::Convert::ToInt32(textSeg -> Text); Res = Num1 + Num2; textRes->Text = System::Convert::ToString(Res); } };
|
|
|
4
|
Programación / Programación C/C++ / Redireccionar a otro winform C++/CLI Error Constructor
|
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....
|
|
|
5
|
Programación / Programación C/C++ / Re: Redireccionar a otro winform C++/CLI
|
en: 26 Agosto 2021, 02:45 am
|
Bueno, era como imaginaba lo del codigo(nombrar el Form que quiero que aparezca pero sin saber con que........(->Show), por ej....., cerrar el actual)
Manejo WEBFORM, y seria Response.Redirect("Url" de la página a llamar o a la cual quiero redireccionar).
No manejo WINFORM.... añado c++......si c#
Ora vez, mil miloones de gracias, un abrazo grande.....
|
|
|
6
|
Programación / Programación C/C++ / Redireccionar a otro winform C++/CLI
|
en: 25 Agosto 2021, 22:15 pm
|
Hola, cómo les va?? Espero que bien... Hoy me comunico para consultarles si sabrían orientarme en cómo Redirecciono a otro Form (Form2), desde un Formulario Principal (Form 1 Windows form)??, después de hacer click en un Botón?? Soy nuevo con esto del C++/CLI.... Fragmento de código: private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) { Form1:: :://lo que quise hacer yo } }; }
Mil millones de gracias... MOD: El código debe ir entre etiquetas de Código GeSHi
|
|
|
7
|
Programación / Programación C/C++ / Error C++
|
en: 22 Agosto 2021, 23:40 pm
|
Hola, amigos, cómo les va?? Me comunico para consultarles lo siguiente: Estoy Trabajando en un Proyecto de winform en C++ Quiero un "Hola Mundo" al apretar un Botón, que aparezca en un Label o MessageShowBox... Ese es el codigo; #pragma once 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::TextBox^ textBox1; private: System::Windows::Forms::Label^ label1; 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->textBox1 = (gcnew System::Windows::Forms::TextBox()); this->label1 = (gcnew System::Windows::Forms::Label()); this->SuspendLayout(); // // Guardar1 // this->Guardar1->BackColor = System::Drawing::SystemColors::ActiveCaption; this->Guardar1->ForeColor = System::Drawing::SystemColors::HotTrack; this->Guardar1->Location = System::Drawing::Point(102, 145); this->Guardar1->Name = L"Guardar1"; this->Guardar1->Size = System::Drawing::Size(75, 23); this->Guardar1->TabIndex = 0; this->Guardar1->Text = L"Guardar"; this->Guardar1->UseVisualStyleBackColor = false; this->Guardar1->Click += gcnew System::EventHandler(this, &Form1::button1_Click); // // textBox1 // this->textBox1->Location = System::Drawing::Point(91, 55); this->textBox1->Name = L"textBox1"; this->textBox1->Size = System::Drawing::Size(100, 20); this->textBox1->TabIndex = 1; this->textBox1->TextChanged += gcnew System::EventHandler(this, &Form1::textBox1_TextChanged); // // 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->label1); this->Controls->Add(this->textBox1); this->Controls->Add(this->Guardar1); this->Name = L"Form1"; this->Text = L"Form1"; this->ResumeLayout(false); this->PerformLayout(); } private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { label1.Text = "Hola Mundo"; } private: System::Void textBox1_TextChanged(System::Object^ sender, System::EventArgs^ e) { } }
Me tira estos 3 Errores, como muestra lo que les adjunto... Error C2143: error de sintaxis: falta"," delante de ";" Error C2143: error de sintaxis: falta";" delante de 'using' Error C2228: el operando izquierdo de ".Text" debe tener class/sruct/union (es un Label) Sabrían resolver ese entuerto?? Desde ya, les agradezco cualquier ayuda...... MOD: El código debe ir entre etiquetas de Código GeSHi
|
|
|
8
|
Programación / .NET (C#, VB.NET, ASP) / como hacer referencia cruzada para acomodar datos en columnas asp.net c#
|
en: 4 Noviembre 2016, 15:47 pm
|
Hola, como les va?.....los molesto para saber si me pueden decir como haria una referencia cruzada para solucionar lo sig: - debo llenar una Grid con las notas de un alumno Horizontalmente, en Nota1, Nota2, Nota3, Trim1, Nota 4, Nota 5, Nota6, Trim2, Nota7, Nota8, Nota9, Trim3..... En la Tabla Notas, estan verticalmente y por Fecha.............. Dejo codigo y Captura de Pantalla de Grid para Graficar..... Agradezco lo que me puedan aporten......Abrazos..... public List<AsistenciaEntity> getAlMat(int Alumno) { try { connection.Open(); command.Parameters.AddWithValue("@Alum", Alumno); command.CommandText = @"SELECT B.Id_Alumno, B.Nombre, B.Apellido, B.Dni, D.Id_Materia, D.Nombre AS NombreMateria, A.Id_Turno, N.Id_Nota, N.Nota, N.Trimestre FROM MateriaPorAlumno AS A, Alumno AS B, TurnoMateria AS C, Materias AS D, Notas AS N WHERE A.Id_Alumno = B.Id_Alumno AND C.Id_Turno = A.Id_Turno AND D.Id_Materia = C.Id_Materia AND N.Id_MateriaPorAlumno = A.Id AND B.Id_Alumno = @Alum Order By N.[Trimestre] Asc"; OleDbDataReader lector = command.ExecuteReader(); try { List <AsistenciaEntity > listAsistencia = new List <AsistenciaEntity >(); while (lector.Read()) { AsistenciaEntity asistencia = new AsistenciaEntity (); asistencia .Turno = new TurnoEntity (); asistencia .Turno.Materia = new MateriaEntity (); asistencia.Turno.Materia.Id_Materia = Convert.ToInt32(lector["Id_Materia"].ToString()); asistencia.Turno.Materia.Nombre = lector["NombreMateria"].ToString(); asistencia .Alumno = new AlumnoEntity (); asistencia.Alumno.Id_Alumno = Convert.ToInt32(lector["Id_Alumno"].ToString()); asistencia.Alumno.Nombre = lector["Nombre"].ToString(); asistencia.Alumno.Apellido = lector["Apellido"].ToString(); asistencia.Alumno.Dni = Convert.ToInt32(lector["Dni"].ToString()); asistencia .MateriaPorAlumno = new MateriaPorAlumnoEntity (); asistencia .MateriaPorAlumno.Turno = new TurnoEntity (); asistencia.MateriaPorAlumno.Turno.Id_Turno = Convert.ToInt32(lector["Id_Turno"].ToString()); asistencia .Nota = new NotaEntity (); asistencia.Nota.Id_Nota = Convert.ToInt32(lector["Id_Nota"].ToString()); asistencia.Nota.Nota = Convert.ToInt32(lector["Nota"].ToString()); asistencia.Nota.Trimestre = Convert.ToInt32(lector["Trimestre"].ToString()); listAsistencia.Add(asistencia); } return listAsistencia; } catch (Exception ex) { throw ex; }
Mod: Esto va en .net, movido. Imagen ajustada a las reglas del foro.
|
|
|
|
|
|
|