0% found this document useful (0 votes)
33 views

Dim As Integer Select Case Case Is Case Is Case Is Case Is Case Is Case Is Case Is Case Is Case Else End Select End

The document contains code for a Visual Studio 2012 application with multiple buttons and functions. It includes code to: 1) Change the background color of the form and buttons to red, yellow, blue, or green when their respective buttons are clicked. 2) Open Paint, Notepad, Windows Explorer, and Calculator applications when their buttons are clicked. 3) Calculate the day of the week corresponding to a number input. 4) Calculate the multiplication table for a given number and display the results in a list box. 5) Determine if a given number is even or odd and display the result. 6) Perform basic math operations like addition, subtraction, multiplication and division on two

Uploaded by

Norelia Cevallos
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Dim As Integer Select Case Case Is Case Is Case Is Case Is Case Is Case Is Case Is Case Is Case Else End Select End

The document contains code for a Visual Studio 2012 application with multiple buttons and functions. It includes code to: 1) Change the background color of the form and buttons to red, yellow, blue, or green when their respective buttons are clicked. 2) Open Paint, Notepad, Windows Explorer, and Calculator applications when their buttons are clicked. 3) Calculate the day of the week corresponding to a number input. 4) Calculate the multiplication table for a given number and display the results in a list box. 5) Determine if a given number is even or odd and display the result. 6) Perform basic math operations like addition, subtraction, multiplication and division on two

Uploaded by

Norelia Cevallos
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

BOTON CALCULAR DIA DE SEMANA

Dim VALOR As Integer


VALOR = NUMERO.Text
Select Case VALOR
Case Is = 1
DIA.Text = "LUNES"
Case Is =
DIA.Text = ""
Case Is = 2
DIA.Text = "MARTES"
Case Is = 3
DIA.Text = "MIERCOLES"
Case Is = 4
DIA.Text = "JUEVES"
Case Is = 5
DIA.Text = "VIERNES"
Case Is = 6
DIA.Text = "SABADO"
Case Is = 7
DIA.Text = "DOMINGO"
Case Else
DIA.Text = "NO ES UN DIA DE SEMANA"
End Select
BOTON SALIR
End
BOTON BORRAR
NUMERO.Text = ""
DIA.Text = ""

BOTON COLOR ROJO


Me.BackColor = Color.Red
rojo.forecolor = Color.Red
verde.forecolor = Color.Red
azul.forecolor = Color.Red
amarillo.ForeColor = Color.Red
Label1.Text = "El formulario cambio a color rojo"
BOTON AMARRILLO
Me.BackColor = Color.Yellow
rojo.ForeColor = Color.Yellow
verde.ForeColor = Color.Yellow
azul.ForeColor = Color.Yellow
amarillo.ForeColor = Color.Yellow
Label1.Text = "El formulario cambio a color amarrillo"
BOTON AZUL
Me.BackColor = Color.Blue
rojo.ForeColor = Color.Blue
verde.ForeColor = Color.Blue
azul.ForeColor = Color.Blue
amarillo.ForeColor = Color.Blue
Label1.Text = "El formulario cambio a color azul"
BOTON VERDE
Me.BackColor = Color.Green
rojo.ForeColor = Color.Green
verde.ForeColor = Color.Green
azul.ForeColor = Color.Green
amarillo.ForeColor = Color.Green
Label1.Text = "El formulario cambio a color verde"
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Shell("C:\WINDOWS\system32\calc.exe", AppWinStyle.NormalFocus)
End Sub

BOTONES A EJECUTAR
BOTON PAINT
Shell("C:\WINDOWS\system32\mspaint.exe", AppWinStyle.MaximizedFocus)
BOTON BLOC DE NOTA
Shell("C:\WINDOWS\system32\notepad.exe", AppWinStyle.NormalFocus)
BOTON EXPLORE WINDOWS
Shell("C:\WINDOWS\explorer.exe", AppWinStyle.MaximizedFocus)
BOTON CALCULADORA
Shell("C:\WINDOWS\system32\calc.exe", AppWinStyle.NormalFocus)

BOTON CALCULAR TABLA DE MULTIPLICACION


Dim _i As Integer
Dim _numero As Integer
Dim _resultado As Integer
Dim _mostrar As String
_numero = CInt(Me.TextBox1.Text)
For _i = 1 To 10
_resultado = _numero * _i
_mostrar = _numero & " * " & _i & " = " & _resultado
Me.ListBox1.Items.Add(_mostrar)
Next
BOTON BORRAR
Me.TextBox1.Text = "" 'Limpia el textbox
Me.ListBox1.Items.Clear() 'Limpia el listBox
BOTON SALIR DE OTRA MANERA NO OLVIDE Q HAY DOS FORMA PARA SALIR
Me.Close()

BOTON DE CALCULAR DE LOS NUMEROS PAR O IMPAR


Dim a As Integer
a = TextBox1.Text
If (a Mod 2 = 0) Then
TextBox2.Text = "El numero " + Trim(a) + " es par"
Else
TextBox2.Text = "El numero " + Trim(a) + " es impar"
End If
BOTON BORRAR
TextBox1.Text = ""
TextBox2.Text = ""
BOTON DE SUMAR
Textbox3.text=val(texbox1.text)+val(textbox2.text)
BOTON DE restar
Textbox3.text=val(texbox1.text)-val(textbox2.text)

BOTON DE dividir
Textbox3.text=val(texbox1.text)/val(textbox2.text)

BOTON DE multiplicar
Textbox3.text=val(texbox1.text)*val(textbox2.text)
Cuales son las herramientas que hemos utilizados en visual studio 2012?
Label
Textbox
Listbox
Button
Cuales son las propiedades que hemos utilizados en visual studio 2012?
Text
Backcolor
Font
Forecolor
Backgroundimagen
Name

Hola chicos(as) cualquiera de estos cdigo tomare en la evaluacin

You might also like