1. Visual Basic - Curso completo teoria y practica
1. Visual Basic - Curso completo teoria y practica 1. Visual Basic - Curso completo teoria y practica
Private Sub PicLienzo_MouseUp(Button As Integer, Shift As Integer, _ End Sub If Button = vbLeftButton Then End If X2 = X Y2 = Y X As Single, Y As Single) RADIO = Sqr((X1 - X2) * (X1 - X2) + (Y1 - Y2) * (Y1 - Y2)) / 2 Select Case FORMA Case 1 Case 2 Case 3 Case 4 Case 5 End Select CONTROLES GRÁFICOS PicLienzo.PSet (X, Y), COLOR PicLienzo.Line -(X, Y), COLOR PicLienzo.Line (X1, Y1)-(X2, Y2), COLOR, B PicLienzo.Circle (X, Y), RADIO, COLOR PicLienzo.Circle (X, Y), RADIO, COLOR, , , 0.5 Visual Basic proporciona tres controles gráficos diseñados para crear efectos gráficos en las aplicaciones: • Control Image (estudiado en el Capítulo 4) • Control Line • Control Shape Pág. 206
Control Line Line es un control gráfico que se muestra como una línea horizontal, vertical o diagonal. El control Line tiene una funcionalidad limitada y está pensado para usos sencillos. Para usos más avanzados debe usar el método Line. Propiedad Descripción BorderColor Devuelve o establece el color de la línea. BorderStyle Devuelve o establece el estilo de la línea. BorderWidth Devuelve o establece el ancho de la línea. X1, Y1, X2, Y2 Devuelven o establecen las coordenadas del Control Shape punto inicial (X1, Y1) y del punto final (X2, Y2) de la línea. Shape es un control gráfico que se muestra como un rectángulo, un cuadrado, una elipse, un círculo, un rectángulo redondeado o un cuadrado redondeado. El control Shape presenta propiedades similares al control Line (BorderColor, BorderStyle, BorderWidth). Adicionalmente, la propiedad Shape del control Shape proporciona seis formas predefinidas. En la tabla siguiente se enumeran todas las formas predefinidas, sus valores y las constantes de Visual Basic equivalentes: Pág. 207
- Page 155 and 156: cadena de caracteres que indica el
- Page 157 and 158: Para realizar alguna operación sob
- Page 159 and 160: nombre del archivo mientras éste p
- Page 161 and 162: universales, de modo que los datos
- Page 163 and 164: Los datos del archivo deben aparece
- Page 165 and 166: Función Input Retorna los siguient
- Page 167 and 168: sus prestaciones son bastante limit
- Page 169 and 170: Private Sub MnuArchivoAbrir_Click()
- Page 171 and 172: longitud), lo cuales son identifica
- Page 173 and 174: Get # NÚMERO_ARCHIVO, NÚMERO_REG,
- Page 175 and 176: La función Loc() aplicada a un arc
- Page 177 and 178: Frame1 Frame2 Frame3 Label1 Label2
- Page 179 and 180: Command3 Command4 Command5 Command6
- Page 181 and 182: End Sub TxtVacantes.Locked = Not Ok
- Page 183 and 184: End Sub POSICION = Loc(N1) + 1 If P
- Page 185 and 186: End Sub Open “C:\DATA\TEMPO.DAT
- Page 187 and 188: Permite grabar en un archivo binari
- Page 189 and 190: Por ejemplo si ingresa el mensaje
- Page 191 and 192: Como ejemplo considere los siguient
- Page 193 and 194: El ejemplo inicial (código hexadec
- Page 195 and 196: Por ejemplo, las instrucciones sigu
- Page 197 and 198: A manera de ejemplo considere la es
- Page 199 and 200: Para el dibujo de puntos se usará
- Page 201 and 202: En el ejemplo anterior se utiliza l
- Page 203 and 204: Para este ejemplo crear una nueva a
- Page 205: Para el desarrollo de la presente a
- Page 209 and 210: Como ejemplo de este tipo de gráfi
- Page 211 and 212: Para realizar nuestra aplicación d
- Page 213 and 214: Para el caso de las gráficas de ec
- Page 215 and 216: Luego proceda a ingresar el código
- Page 217 and 218: La matemática fractal es producto
- Page 219 and 220: Para el desarrollo de la presente a
- Page 221 and 222: En este capítulo, debido a las lim
- Page 223 and 224: La presente Guía de Laboratorio de
- Page 225 and 226: Para el desarrollo de esta aplicaci
- Page 227 and 228: Text1 Text2 Text3 Text4 Text5 Text6
- Page 229 and 230: Luego, haga doble click sobre el bo
- Page 231 and 232: A continuación active la casilla d
- Page 233 and 234: Label10 Nombre LblImpuesto Caption
- Page 235 and 236: En primer lugar debemos cargar los
- Page 237 and 238: A continuación haga doble click so
- Page 239 and 240: Private Sub CmdAceptar_Click() Dim
- Page 241 and 242: Los descuentos a aplicar son sobre
- Page 243 and 244: Label4 Label5 Text1 Text2 Text3 Tex
- Page 245 and 246: Check3 Command1 Command2 Command3 N
- Page 247 and 248: Cuatro notas entre 0 y 20 represent
- Page 249 and 250: Label6 Label7 Text1 Text2 Text3 Tex
- Page 251 and 252: N3 = Val(TxtN3) : N4 = Val(TxtN4) P
- Page 253 and 254: Form1 Label1 Label2 Label3 Label4 T
- Page 255 and 256: Case 10: CadMes = “Octubre” Cas
Private Sub PicLienzo_MouseUp(Button As Integer, Shift As Integer, _<br />
End Sub<br />
If Button = vbLeftButton Then<br />
End If<br />
X2 = X<br />
Y2 = Y<br />
X As Single, Y As Single)<br />
RADIO = Sqr((X1 - X2) * (X1 - X2) + (Y1 - Y2) * (Y1 - Y2)) / 2<br />
Select Case FORMA<br />
Case 1<br />
Case 2<br />
Case 3<br />
Case 4<br />
Case 5<br />
End Select<br />
CONTROLES GRÁFICOS<br />
PicLienzo.PSet (X, Y), COLOR<br />
PicLienzo.Line -(X, Y), COLOR<br />
PicLienzo.Line (X1, Y1)-(X2, Y2), COLOR, B<br />
PicLienzo.Circle (X, Y), RADIO, COLOR<br />
PicLienzo.Circle (X, Y), RADIO, COLOR, , , 0.5<br />
<strong>Visual</strong> <strong>Basic</strong> proporciona tres controles gráficos diseñados<br />
para crear efectos gráficos en las aplicaciones:<br />
• Control Image (estudiado en el Capítulo 4)<br />
• Control Line<br />
• Control Shape<br />
Pág. 206