Semana2-Mostrar Formularios y Visualizar Tipos de Datos
-
Upload
sergio-gonzalez -
Category
Documents
-
view
222 -
download
0
Transcript of Semana2-Mostrar Formularios y Visualizar Tipos de Datos
-
7/26/2019 Semana2-Mostrar Formularios y Visualizar Tipos de Datos
1/3
MOSTRAR FORMULARIOS VISUALIZAR TIPOS DE DATOS
5.- Realizar un programa en la que utilicemos la funcin show, para que al momento de oprimir un botn de
una bandera, me muestre un formulario correspondiente a pas.
1.-Abre un nuevo proyecto y gurdalo con el nombre pases.
2.- Arrastra los controles necesarios para poder crear tu aplicacin.
Realiza la siguiente configuracin para los controles
propieda BUTTON1 BUTTON2 BUTTON3 BUTTON4Name btnMexico btnArgentina btnArgentina btnFinalizar
AutoSize False False False False
BacKColor Red Red Red Red
Text Mxico Argentina Brasil Finalizar
Font MicrosoftSans Serif
MicrosoftSans Serif
MicrosoftSans Serif
MicrosoftSans Serif
Image Escoger unabandera
Escoger unabandera
Escoger unabandera
Escoger unabandera
TextAlign BottomCenter BottomCenter BottomCenter BottomCenter
6.- Realizar un programa en la que identifiquemos los diferentes tipos de datos que utiliza visual basic.net.
1.-Abre un nuevo proyecto y gurdalo con el nombre de tipos de datos.
2.- Arrastra los controles necesarios para poder crear tu aplicacin.
propieda Label1 Label2 Label3 Label4 Label5 Label6 Label7 Label8
Name lblBoolean lblbyte lblchar lblfecha lbldecimal lbldouble lblinteger lblLonger
AutoSize True True True True True True True True
Text Boolean Byte Char Fecha/Hora Decimal Double Integer Longer
TextAlign TopLeft TopLeft TopLeft TopLeft TopLeft TopLeft TopLeft TopLeft
Font Arial
RoundedMT
Arial
RoundedMT
Arial
Rounded MT
Arial
RoundedMT
Arial
RoundedMT
Arial
RoundedMT
Arial
RoundedMT
Arial
RoundedMT
ForeColor Black Black Black Black Black Black Black Black
PrivateSubbtntiposdatos_Click(ByValsender AsSystem.Object, ByVale AsSystem.EventArgs) Handlesbtntiposdatos.Click
Dimboleana AsBoolean= FalseDimbytes AsByte= 101
propieda Label9 Label10 Button1 Button2
Name lblShort lblstring btndatos btnSalir
AutoSize True True False False
Text Short String Tipos dedatos
Salir
TextAlign TopLeft TopLeft MiddleCe
nter
MiddleCe
nterFont Arial
RoundedMT
ArialRoundedMT
ArialRoundedMT
ArialRoundedMT
ForeColor Black Black Black Black
-
7/26/2019 Semana2-Mostrar Formularios y Visualizar Tipos de Datos
2/3
Dimcaracter AsChar= "a"Dimfecha_hora AsDateDimcon_decimal AsDecimal= 10.23Dimentera AsInteger= 32000Dimdoble AsDouble= 63528457Dimlarga AsLong= 100258479Dimcorta AsShort= 27000Dimcadena AsString= "Hola como estan"
txtBoolean.Text = boleanatxtByte.Text = bytestxtChar.Text = caracter
txtFecha.Text = fecha_hora
7.- Realizar el un programa en donde utilicemos los operadores aritmticos para realizar las operaciones
basicas.
1.-Abre un nuevo proyecto y gurdalo con el nombre de operadores aritmticos.
2.- Arrastra los controles necesarios para poder crear tu aplicacin.
propieda Label1 Label2 Label3 Label4 Label5 Label6 Label7 Button1
Name txtExponente
Lblmulti lbldiv lblentera lblresiduol Lblsuma lblresta btnobtener
AutoSize True True True True True True True False
Text Exponenciacin
Multiplicacin
Divisin DivisionEntera
Residuo Suma Resta Tipos dedatos
TextAlign TopLeft TopLeft TopLeft TopLeft TopLeft TopLeft TopLeft MiddleCenter
Font ArialRoundedMT
ArialRoundedMT
ArialRounded MT
ArialRoundedMT
ArialRoundedMT
ArialRoundedMT
ArialRoundedMT
ArialRoundedMT
ForeColor Black Black Black Black Black Black Black Black
PublicClassfrmAritmeticos
PrivateSubbtnObtener_Click(ByValsender AsSystem.Object, ByVale AsSystem.EventArgs)
HandlesbtnObtener.ClickDimnum1, num2 AsIntegernum1 = 13num2 = 6txtExponente.Text = num1 ^ num2txtMultiplicacion.Text = num1 * num2txtDivision.Text = num1 / num2txtEntera.Text = num1 \ num2txtResiduo.Text = num1 Modnum2txtSuma.Text = num1 + num2
txtResta.Text = num1 - num2
8.-Realizar una aplicacin de una calculadora para realizar operaciones aritmticas
propieda Button2
Name btnsalir
AutoSize False
Text Salir
TextAlign MiddleCenter
Font Arial Rounded MT
ForeColor Black
-
7/26/2019 Semana2-Mostrar Formularios y Visualizar Tipos de Datos
3/3
1.- Abre un nuevo proyecto y gurdalo con el nombre de mi calculadora.
2.- Arrastra los controles necesarios para poder crear tu aplicacin.
PublicClassfrmCalculadoraDimnum1, num2 AsInteger
PrivateSubbtnMultiplicacion_Click(ByValsender AsSystem.Object, ByVale As
System.EventArgs) HandlesbtnMultiplicacion.Click
num1 = Val(txtnum1.Text)num2 = Val(txtnum2.Text)txtresultado.Text = num1 * num2lblSigno.Text = "*"
EndSub
PrivateSubbtnDivision_Click(ByValsender AsSystem.Object, ByVale AsSystem.EventArgs) HandlesbtnDivision.Click
num1 = Val(txtnum1.Text)num2 = Val(txtnum2.Text)txtresultado.Text = num1 / num2lblSigno.Text = "/"
EndSub