Beruflich Dokumente
Kultur Dokumente
DE VISUAL BASIC
GRUPO
KIANA GUARDIA
SIMARA GMEZ
KATHIUSKA SANTOS
CAROLINA VALDES
ANA TENORIO
GRUPO#5
SHAPE
Line
ejemplos
' Visual Basic 6.0
Private Sub Form_Load()
' Draw a 1000 twip diameter red
circle.
Shape1.Top = 0
Shape1.Left = 0
' Visual Basic
Shape1.Height = 1000
Private Sub Form3_Paint(ByVal
Shape1.Width = 1000
sender As Object, ByVal e As _
Shape1.Shape = vbShapeCircle
Shape1.BorderColor = vbRed System.Windows.Forms.PaintEventAr
gs) Handles MyBase.Paint
End Sub
' Draw a 70 pixel diameter red
circle.
e.Graphics.DrawEllipse(Pens.Red, 0,
0, 70, 70)
End Sub
NOTA: En Visual Basic 6.0 la unidad
de medida predeterminada eran los
twips; en Visual Basic 2008 son los
pxeles.
Ejemplos
' Visual Basic 6.
Private Sub Form_Load()
' Draw a horizontal line 200 twips
from the top of the form.
Line1.X1 = 0
Line1.X2 = Me.Width
Line1.Y1 = 200
Line1.Y2 = 200
Line1.BorderColor = vbRed
Line1.BorderWidth = 1
' Draw a vertical line 200 twips
from the left of the form.
Line1.Y1 = 0
Line1.Y2 = Me.Height
Line1.X1 = 200
Line1.X2 = 200
Line1.BorderColor = vbBlue
Line1.BorderWidth = 1
Image
Data
ole
ejemplo
Ole
Grid
Ejemplo
El siguiente cdigo crea un grid de
dos columnas con las letras desde la
A hasta la Z y sus cdigos ASCII.
MSFlexGrid1.Rows = 0
For I = Asc("A") To Asc("Z")
MyData = Chr$(I) & vbTab & I
MSFlexGrid1.AddItem MyData