SHARE
TWEET

stumble memory

ledlight Oct 10th, 2019 (edited) 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'Visual Basic 2010 Express
  2.  
  3. Public Class AND_OR_LATCH
  4.     Dim ogar As New Font("Consolas", 20)
  5.     Dim First_Line, Second_Line, Third_Line_and_Out_Put, the_Or_circuit_ouput As Boolean 'false
  6.  
  7.     Private Sub Form1_KeyUp(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp
  8.         Select Case e.KeyCode
  9.             Case Keys.A
  10.                 Second_Line = Not Second_Line
  11.             Case Keys.Space
  12.                 First_Line = Not First_Line
  13.         End Select
  14.         Me.Invalidate()
  15.         the_Or_circuit_ouput = Second_Line Or Third_Line_and_Out_Put 'homerun FIRST LINE
  16.         Third_Line_and_Out_Put = the_Or_circuit_ouput And First_Line
  17.     End Sub
  18.  
  19.     Private Sub Form1_Paint(sender As Object, e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
  20.         If Third_Line_and_Out_Put = True Then
  21.             e.Graphics.DrawString("dropit", ogar, New SolidBrush(Color.FromArgb(255, 0, 80, 210)), 50, 50)
  22.             e.Graphics.FillEllipse(New SolidBrush(Color.Green), 100, 100, 40, 40)
  23.         End If
  24.         If Second_Line = True Then
  25.             e.Graphics.FillEllipse(New SolidBrush(Color.Red), 150, 100, 40, 40)
  26.         End If
  27.         If Second_Line = False Then
  28.             e.Graphics.FillEllipse(New SolidBrush(Color.Yellow), 200, 100, 40, 40)
  29.         End If
  30.         If the_Or_circuit_ouput = False Then
  31.             e.Graphics.FillEllipse(New SolidBrush(Color.Magenta), 50, 100, 40, 40)
  32.         End If
  33.         If the_Or_circuit_ouput = True Then
  34.             e.Graphics.FillEllipse(New SolidBrush(Color.Blue), 100, 150, 40, 40)
  35.         End If
  36.         'If Third_Line_and_Out_Put = False And Second_Line = False Then
  37.         '    e.Graphics.FillEllipse(New SolidBrush(Color.Blue), 100, 150, 40, 40)
  38.         'End If
  39.     End Sub
  40. End Class
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top