JAugusto
quinta-feira, 24 de maio de 2012
Limpando TextBox
Sub
Limpar()
For
Each
c
As
Control
In
Me
.Controls
If
TypeOf
c
Is
TextBox
Then
'Escolha qualquer tipo de controle
c.Text =
String
.Empty
'
Escolha qualquer tipo de propriedade
End
If
Next
End
Sub
Movimentando um Objeto em circulo
Private
angulo = 0
Private
raio = 150
Private
pos =
New
Point
Sub
posCircular(
ByVal
angulo,
ByVal
raio)
Dim
rad = angulo * Math.PI / 180
pos.X = Math.Sin(rad) * raio
pos.Y = Math.Cos(rad) * raio
End Sub
Private Sub
Timer1_Tick(
ByVal
sender
As
System.Object,
ByVal
e
As
System.EventArgs)
Handles
Timer1.Tick
posCircular(angulo, raio)
RadioButton1.Left = pos.X +
Me
.Width / 2
RadioButton1.Top = pos.Y +
Me
.Height / 2
angulo += 1
If
angulo > 359
Then
angulo = 0
End Sub
Página inicial
Assinar:
Postagens (Atom)