Professional Documents
Culture Documents
Arteaga Brenda
2.-
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
Timer1.Enabled = True
End Sub
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Timer1.Interval = 1000
End Sub
Arteaga Brenda
Arteaga Brenda
Arteaga Brenda
3.-
Public Class Form1
Private Sub HScroll1_Change()
'Mostramos en la barra de titulo del form el valor del SCrollBar
Me.Caption = "Intervalo: " & HScroll1.Value & " milisegundos"
'Le colocamos el Interval al Timer, el valor de la barra (su propiedad
Value)
Timer1.Interval = HScroll1.Value
End Sub
Arteaga Brenda
4.-
Public Class Form1
Public x As Integer
Dim m As Integer
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
End Sub
End Class
Arteaga Brenda
5.-
Public Class Form1
Dim y As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Label1.Text = "HOLA"
Label1.Location = New Point(0, Contenedor.Bottom)
End Sub
Else
y = Contenedor.Bottom
End If
Label1.Location = New Point(10, y)
End Sub
End Class
Arteaga Brenda
6.-
Public Class Form1
Public x As Integer
Private Sub Timer1_Tick_1(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
If PictureBox1.Right < Me.Right Then
x = x + 20
Else
x = Me.Left
End If
PictureBox1.Location = New Point(x, 15)
End Sub
End Class
7.-
Public Class Form1
Public x As Integer
Private Sub Timer1_Tick_1(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
Static DibActual As Integer
If DibActual = 2 Then DibActual = -1
DibActual = DibActual + 1
PictureBox1.Left = PictureBox1.Left + 2
PictureBox1.Image = Leo.Images(DibActual)
End Sub
End Class
Arteaga Brenda
8.-
Public Class Form1
Public x As Integer
Private Sub Timer1_Tick_1(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
If PictureBox1.Right < Me.Right Then
x = x + 20
Else
x = Me.Left
End If
PictureBox1.Location = New Point(x, 15)
End Sub
Public z As Integer
End Class
Arteaga Brenda