Visual Basic - Funcion recursiva Fibonacci

Written by lopezatienza on 29 Octubre 2008 – 14:33 -


Primeramente crearemos nuestro proyecto.

Agregamos un tipo Button llamado "btncalcular".

Agregamos un label llamado "lbserie".



Agregamos el siguiente código a "Form1.vb"

Read more »


Tags:
Posted in Visual Basic .NET | No Comments »

Visual Basic - Comprobar TextBox vacios

Written by lopezatienza on 29 Octubre 2008 – 14:26 -


Creamos nuestro Proyecto.

Agregamos 4 TextBox llamados: "tbnombre" , "tbdireccion" , "tbedad" , "tbtelefono"

Agregamos un Button llamado "btnaceptar"



Introducimos el siguiente código en "Form1.vb"

Read more »


Tags:
Posted in Visual Basic .NET | 2 Comments »

Visual Basic - Form cambia de Celtius a Fahrenheit

Written by lopezatienza on 29 Octubre 2008 – 12:50 -

 Crearemos un proyecto nuevo.Introducimos un TextBox llamado "tbcentigrados".

Introducimos un TextBox llamado "tbfahrenheit".

Introducimos un Button llamado "btcentigrados".

Introducimos un Button llamado "btfahnrenheit".

Introducimos un Button llamado "btnlimpiar".

http://www.lopezatienza.es/Imagenes/Fahrenheit.JPG


Read more »


Tags:
Posted in Visual Basic .NET | No Comments »

Visual Basic - Cambiar estilo del texto a un TextBox

Written by lopezatienza on 29 Octubre 2008 – 11:47 -


Primeramente crearemos un proyecto Application Form.

Le damos el nombre de "ventana" a nuestro formulario.

Crearemos un TextBox llamado "tbintro".

Un CheckBox llamado "cknegrita".

Un CheckBox llamado "cksubrayado".

Un CheckBox llamado "ckrojo".

Introduciremos el siguiente código en nuestro "Form1.vb"

Read more »


Tags:
Posted in Visual Basic .NET | No Comments »

Visual Basic - Llamada de varios eventos

Written by lopezatienza on 29 Octubre 2008 – 11:37 -


Veremos un ejemplo de las llamadas a varios eventos:Primeramente creamos un proyecto.
Le damos el nombre de "ventana" a nuestro Form1.

Introducimos un boton llamado "btn".

Copiamos y pegamos este código en el "Form1.vb".

Read more »


Tags:
Posted in Visual Basic .NET | No Comments »

Visual Basic - Clase IO

Written by lopezatienza on 29 Octubre 2008 – 11:33 -

IO.StreamWriter // nos permite I / S de archivos en dispositivos

SaveFileDialog .Title
.InitialDirectory
.Filter = " Literal \ *.doc \ Literal \ *.txt "
Literal == [ Documentos | Imagenes ]
.Filename
.DefaultExt
.CheckFileExists
.ValidateNames

Dim variable As IOStreamWriter
variable = new IOStreamWriter(SaveFileDialog1.FileName)
variable.Write(TBox.Text)
variable.close

Read more »


Tags:
Posted in Visual Basic .NET | No Comments »

Visual Basic - Cuadro de texto personalizado

Written by lopezatienza on 24 Octubre 2008 – 16:01 -



Dim Fuente As New Font (New FontFamily(“Arial”), tamaño) 'Le damos la fuente que deseemos y el tamaño

Dim Colores As New HatchBrush(HatchBrush.FUERZA, color.Aqua, color.Green) 'Le damos el color que deseemos

   SolidBrush(color.Aqua) 'Estilo del color

   PathGradientBrush(puntos) 'Dimensiones

DrawString(texto, Fuente, Colores) 'Propiedades

DrawImage(archivoBitmap, x, y, ancho, alto)
'Lo dibujamos


Tags:
Posted in Visual Basic .NET | No Comments »

Visual Basic - System.Drawing

Written by lopezatienza on 21 Octubre 2008 – 17:35 -


Graphics 'Especifica el entorno en el ke se va a dibujar el dibujo

Pen 'Que tipo de trazo se utilizara para dibujar

Brush 'Tipo de color y relleno que vamos a usar

Dim grafico As Graphics = me.graphics

Dim lapiz As New Pen(color, grosor)

Dim rectangulo As New Rectangle(x1,y1,x2,y2) 'de arriba izquierda a abajoderecha

Read more »


Tags:
Posted in Visual Basic .NET | No Comments »

Visual Basic - Archivos

Written by lopezatienza on 11 Octubre 2008 – 18:30 -


Unidades de almacenamiento:

System Environment.GetlogicalDrives 'Recorrer unidades logicas del sistema

Dim unidades() As String 'Se crea un array tipo string para contener las unidades

unidades = System Environment.GetlogicalDrives 'Se toman las unidades del sistema

Read more »


Tags:
Posted in Visual Basic .NET | No Comments »

Visual Basic - Recursividad

Written by lopezatienza on 11 Octubre 2008 – 17:44 -


1. DOS VALORES ENTEROS SON O NO IGUALES

Public Class Form1

Function iguales(ByVal x As Integer, ByVal y As Integer) As Boolean

If x = y Then

Return True

Read more »


Tags:
Posted in Visual Basic .NET | No Comments »
RSS