1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
Public Class UserControl1
Public Sub New()
' Cet appel est requis par le concepteur.
InitializeComponent()
' Ajoutez une initialisation quelconque après l'appel InitializeComponent().
Button1.Text = "On "
Button1.Font = New Font("arial", 14.0, FontStyle.Bold)
Button1.AutoSize = True
Button1.Location = New Point(0, 0)
Button2.Text = "Off"
Button2.Font = New Font("arial", 14.0, FontStyle.Bold)
Button2.AutoSize = True
Button2.Location = New Point(110, 0)
Button1.Visible = True
Button2.Visible = False
Me.MaximumSize = New Size(Button1.Width + Button2.Width, Button1.Height)
Me.Size = New Size(Button1.Width + Button2.Width, Button1.Height)
End Sub
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ModAnimate.Animate(Button1, ModAnimate.Effect.Slide, 130, ModAnimate.Direction.RightLeft)
ModAnimate.Animate(Button2, ModAnimate.Effect.Slide, 130, ModAnimate.Direction.RightLeft)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ModAnimate.Animate(Button2, ModAnimate.Effect.Slide, 130, ModAnimate.Direction.LeftRight)
ModAnimate.Animate(Button1, ModAnimate.Effect.Slide, 130, ModAnimate.Direction.LeftRight)
End Sub
End Class |
Partager