Advertisement
ledlight

computer game REACT

Feb 5th, 2024
1,686
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.97 KB | Source Code | 0 0
  1. Public Class MyButton
  2.     Inherits Button
  3.  
  4.     Public ToggleSwitch As Integer
  5.     Public Zähler As Integer
  6.     Public Sub New()
  7.     End Sub
  8.     Sub KonfettiKonfekt(Schalenfrucht As Button)
  9.         With Schalenfrucht
  10.             .Location = New Point(0, 220)
  11.             .Size = New Point(52, 52)
  12.         End With
  13.     End Sub
  14.     Private Sub MyButton_Click(sender As Object, e As EventArgs) Handles Me.Click
  15.         If Not ToggleSwitch Then
  16.             MsgBox("Array: One")
  17.             Zähler += 1
  18.         Else
  19.             MsgBox("Array: Two")
  20.             Zähler -= 1
  21.         End If
  22.         ToggleSwitch = Not ToggleSwitch
  23.     End Sub
  24.     Private Sub MyButton_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint
  25.         If ToggleSwitch = True Then
  26.             e.Graphics.DrawImage(New Bitmap("C:\Temp\DimSim.bmp"), 2, 2)
  27.         Else
  28.             e.Graphics.DrawImage(New Bitmap("C:\Temp\RaidThrough.bmp"), 2, 2)
  29.         End If
  30.     End Sub
  31. End Class
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement