Fffffewf

Páginas: 4 (784 palabras) Publicado: 16 de septiembre de 2011
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'open file dialog
OpenFile.InitialDirectory ="c:" ' ALT 92 \
OpenFile.Filter = "textfiles|*.txt|all files|*." ' ALT 124 |
OpenFile.FilterIndex = 1
OpenFile.RestoreDirectory = True

' abrimos el CONTROL Y' si damos clixck en ok obtenemos la ruta del archivo selecccionado
If OpenFile.ShowDialog() = Windows.Forms.DialogResult.OK Then
MsgBox(OpenFile.FileName)

EndIf

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
' contorl color dialog
ColorDialog.Color =Me.BackColor
ColorDialog.AllowFullOpen = True
'`mostrar el control color dialog
ColorDialog.ShowDialog()
' asigno el color seleccionado al formularioMe.BackColor = ColorDialog.Color

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
' FONT DIALOGFontDialog.Font = Button3.Font
FontDialog.ShowColor = True
FontDialog.ShowEffects = True
FontDialog.FixedPitchOnly = False
FontDialog.ShowDialog()
' asignar losvalores selecionados al control
Button3.Font = FontDialog.Font
Button3.ForeColor = FontDialog.Color

End Sub
End Class

-------------------------------------------------

PublicClass Form2
Dim nprod As Integer

Private Sub btnAgregar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAgregar.Click
If txtProducto.Text.Length = 0Then
MsgBox("falta ingresar el producto")
Else
lstProductos.Items.Add(txtProducto.Text)

End If
txtProducto.Clear()
txtProducto.Focus()...
Leer documento completo

Regístrate para leer el documento completo.

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS