diseño de formularios

16
DISEÑO DE FORMULARIOS

Upload: yimi-casana-arias

Post on 21-Jun-2015

3.156 views

Category:

Education


1 download

TRANSCRIPT

Page 1: Diseño de formularios

DISEÑO DE FORMULARIOS

Page 2: Diseño de formularios

ESTRUCTURA DE UNA SOLUCIÓN

SOLUCIÓNPROYECTO

FORMULARIOSCONTROLES

Page 3: Diseño de formularios

CREAR UN PROYECTO

Page 4: Diseño de formularios

CREAR UN PROYECTO …

Page 5: Diseño de formularios

CREAR FORMULARIOS

Page 6: Diseño de formularios

CREAR FORMULARIOS …

Page 7: Diseño de formularios

DISEÑO DEL FORMULARIO

Page 8: Diseño de formularios

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

Page 9: Diseño de formularios

VENTANA PROPIEDADES

LA VENTANA PROPIEDADES SOLO SE ACTIVA CUANDO ESTÁ ABIERTO UN

FORMULARIO

Page 10: Diseño de formularios

ESTRUCTURAS DE CONTROL

ESTRUCTURA SECUENCIAL (PROCESOS SECUENCIALES)

ESTRUCTURAS CONDICIONALESo ESTRUCTURA CONDICIONAL SIMPLEo ESTRUCTURA CONDICIONAL DOBLEo ESTRUCTURA CONDICIONAL

COMPUESTAESTRUCTURA SELECTIVAESTRUCTURAS REPETITIVAS

Page 11: Diseño de formularios

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(); } }; }

Page 12: Diseño de formularios

ESTRUCTURAS CONDICIONALES

Page 13: Diseño de formularios

#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(); } }; }

Page 14: Diseño de formularios

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)

Page 15: Diseño de formularios

ESTRUCTURAS REPETITIVAS

Page 16: Diseño de formularios

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)