Tutorial Visual

Páginas: 7 (1719 palabras) Publicado: 8 de diciembre de 2012
TUTORIAL

Sobre el Form 1 realizar lo siguiente:
Propiedades del Form 1 |
Name | frmInicio |
Text | Inicio |

Insertar 5 Button en el frmInicio

Cambiar propiedades de los button del frmInicio
Propiedades del button1 |
Name | btnOperaciones |
Text | Operaciones |
Propiedades del button2 |
Name | btnGrados |
Text | Grados |
Propiedades del button3 |
Name |btnIn_Corriente |
Text | Intensidad de Corriente |
Propiedades del button4 |
Name | btnDatos |
Text | Tipos de Datos |
Propiedades del button5 |
Name | btnSalir |
Text | Salir |

Agregar código a btnSalir del frmInicio
Codigo del btnSalir |
private void btnSalir_Click(object sender, EventArgs e) { this.Dispose(); } |
NOTA: Recordar que para agregar codigo a unbutton (boton), basta con hacer doble clic sobre el.
Insertar 4 Form

Sobre el Form 2 realizar lo siguiente:
Propiedades del Form 2 |
Name | frmOperaciones |
Text | Operaciones |

Insertar 3 label, 3 TextBox y 6 button

Cambiar propiedades de los label del frmOperaciones
Propiedades del label1 |
Text | Numero 1 |
Propiedades del label2 |
Text | Numero 2 |
Propiedades dellabel3 |
Text | Resultado |
Enabled | False |

Cambiar propiedades de los TextBox del frmOperaciones
Propiedades del TextBox1 |
Name | txtN1 |
Propiedades del TextBox2 |
Name | txtN2 |
Propiedades del TextBox3 |
Name | txtResult |

Cambiar propiedades de los button del frmOperaciones
Propiedades del button1 |
Name | btnSuma |
Text | Suma |
Propiedades del button2 |
Name |btnResta |
Text | Resta |
Propiedades del button3 |
Name | btnMultiplica |
Text | Multiplicación |
Propiedades del button4 |
Name | btnDivision |
Text | División |
Propiedades del button5 |
Name | btnLimpiar |
Text | Limpiar |
Propiedades del button6 |
Name | btnRegresar |
Text | Regresar |

Agregar código a btnLimpiar del frmOperaciones
Codigo del btnLimpiar |private void btnLimpiar_Click(object sender, EventArgs e) { txtN1.Clear(); txtN2.Clear(); txtResult.Clear(); } |
NOTA: Para limpiar un TextBox también se puede realizar de la siguiente forma: txtN1.Text=””;
Agregar código a btnRegresar del frmOperaciones
Codigo del btnRegresar |
private void btnRegresar_Click(object sender, EventArgs e){ frmInicio fi = new frmInicio(); fi.Show(); this.Visible = false; } |
Con la instrucción frmInicio fi=new frmInicio(); se crea un objeto llamado fi, o crear una instancia del frmInicio en fi.
Con la instrucción fi.Show(); permite visualizar el formulario de Inicio frmInicio.
Con la instrucción this.Visible=false; permite indicar que no se visualice elformulacio actual frmOperaciones.
Código que debe incluirse en la clase, pero fuera de cualquier método |
private static bool isDouble(string cadena) { bool ban = false; for (int i = 0; i < cadena.Length; i++) { char c = cadena[i]; if ((c >= '0') && (c <= '9')) { continue;} else { if ((c == '.') && (i != 0 && i < (cadena.Length - 1)) && (cadena[i - 1] != '.')) { ban = true; } else { return false; } } }return ban; } |
private static bool isInt(string cadena) { bool ban = false; for (int i = 0; i < cadena.Length; i++) { char c = cadena[i]; if ((c >= '0') && (c <= '9')) { ban = true; continue; } else...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Tutorial visual basic
  • Tutorial de programación visual basic
  • Tutorial de Programación Visual C++
  • Tutorial visual basic
  • tutorial visual basic
  • Tutorial de visual basic
  • Tutorial De Visual Basic
  • Tutorial Visual Studio 2008

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS