diseño de formularios

Post on 21-Jun-2015

3.158 Views

Category:

Education

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

DISEÑO DE FORMULARIOS

ESTRUCTURA DE UNA SOLUCIÓN

SOLUCIÓNPROYECTO

FORMULARIOSCONTROLES

CREAR UN PROYECTO

CREAR UN PROYECTO …

CREAR FORMULARIOS

CREAR FORMULARIOS …

DISEÑO DEL FORMULARIO

VENTANA CUADRO DE HERRAMIENTAS

CASILLA DE VERIFICACIÓN

CASILLA DE VERIFICACIÓNCON CUADRO DE LISTA

CUADRO COMBINADO

ETIQUETA

SELECCIONADOR DEFECHA/HORA

CUADRO DE LISTA

BOTÓN RADIO

CAJA DE TEXTO

SE HA COLOCADO EL

NOMBRE DE LAS MÁS USADAS

VENTANA PROPIEDADES

LA VENTANA PROPIEDADES SOLO SE ACTIVA CUANDO ESTÁ ABIERTO UN

FORMULARIO

ESTRUCTURAS DE CONTROL

ESTRUCTURA SECUENCIAL (PROCESOS SECUENCIALES)

ESTRUCTURAS CONDICIONALESo ESTRUCTURA CONDICIONAL SIMPLEo ESTRUCTURA CONDICIONAL DOBLEo ESTRUCTURA CONDICIONAL

COMPUESTAESTRUCTURA SELECTIVAESTRUCTURAS REPETITIVAS

ESTRUCTURAS SECUENCIALES

Inicio

Leer b,a

P = 2 * (b * h)S = b * h

Fin

#pragma endregion//LIMPIARprivate: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {

textBox1->Text=String::Empty;textBox2->Text=String::Empty;textBox3->Text=String::Empty;textBox4->Text=String::Empty;textBox1->Focus();

}//CALCULARprivate: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {Int16 b,h,p,s;b=Convert::ToInt16(textBox1->Text);h=Convert::ToInt16(textBox2->Text);p=2*(b*h);s=b*h;textBox3->Text=p.ToString();textBox4->Text=s.ToString();}//SALIRprivate: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) {this->Close(); } }; }

ESTRUCTURAS CONDICIONALES

#pragma endregionprivate: System::Void cmdnuevo_Click(System::Object^ sender, System::EventArgs^ e) {

listBox1->Items->Clear(); label5->Text="0";label6->Text="0";label7->Text="0"; textBox1->Text=String::Empty;textBox1->Focus(); }

private: System::Void cmdagregar_Click(System::Object^ sender, System::EventArgs^ e) {

listBox1->Items->Add(textBox1->Text); textBox1->Text=String::Empty; textBox1->Focus(); }

private: System::Void textBox1_KeyPress(System::Object^ sender, System::Windows::Forms::KeyPressEventArgs^ e) {

if (e->KeyChar ==(char)13) cmdagregar->Focus(); } }; }

private: System::Void cmdmostrar_Click(System::Object^ sender, System::EventArgs^ e) {

Int32 nrotot,nro,cuenta=0,cuenta1=0,cuenta2=0; nrotot=listBox1->Items->Count; for (Int32 i=0; i<nrotot;i++)

{listBox1->SelectedIndex = i;nro=Convert::ToInt32(listBox1->Text);if (nro<15) {

cuenta=cuenta+1;}

else if (nro>50) {cuenta1=cuenta1+1;

}else if (nro>=25 && nro<=45) {

cuenta2=cuenta2+1;} }label5->Text=cuenta.ToString(); label6->Text=cuenta1.ToString(); label7->Text=cuenta2.ToString(); }

ESTRUCTURA CONDICIONAL COMPUESTA (MÚLTIPLES

CONDICIONES)

ESTRUCTURAS REPETITIVAS

private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {

textBox1->Text=String::Empty;textBox2->Text=String::Empty;textBox1->Focus(); }

private: System::Void formfactorial_Load(System::Object^ sender, System::EventArgs^ e) {

textBox1->Text=String::Empty;textBox2->Text=String::Empty;textBox1->Focus();textBox2->Enabled=false; }

private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {

int n;int fact=1;int c=1;n=Convert::ToInt32(textBox1->Text);for(c=1;c<=n;c++){

fact=fact*c;}textBox2->Text=fact.ToString(); }

ESTRUCTURA REPETITIVA

for(vi;vf;incremento)

top related