Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class MyButton
- Inherits Button
- Public ToggleSwitch As Integer
- Public Zähler As Integer
- Public Sub New()
- End Sub
- Sub KonfettiKonfekt(Schalenfrucht As Button)
- With Schalenfrucht
- .Location = New Point(0, 220)
- .Size = New Point(52, 52)
- End With
- End Sub
- Private Sub MyButton_Click(sender As Object, e As EventArgs) Handles Me.Click
- If Not ToggleSwitch Then
- MsgBox("Array: One")
- Zähler += 1
- Else
- MsgBox("Array: Two")
- Zähler -= 1
- End If
- ToggleSwitch = Not ToggleSwitch
- End Sub
- Private Sub MyButton_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint
- If ToggleSwitch = True Then
- e.Graphics.DrawImage(New Bitmap("C:\Temp\DimSim.bmp"), 2, 2)
- Else
- e.Graphics.DrawImage(New Bitmap("C:\Temp\RaidThrough.bmp"), 2, 2)
- End If
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement