Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.71 KB | None | 0 0
  1. <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
  2. Partial Class Form1
  3. Inherits System.Windows.Forms.Form
  4. Dim r As New Random
  5. Dim a As Long
  6. 'Form overrides dispose to clean up the component list.
  7. <System.Diagnostics.DebuggerNonUserCode()> _
  8. Protected Overrides Sub Dispose(ByVal disposing As Boolean)
  9. Try
  10. If disposing AndAlso components IsNot Nothing Then
  11. components.Dispose()
  12. End If
  13. Finally
  14. MyBase.Dispose(disposing)
  15. End Try
  16. End Sub
  17.  
  18. 'Required by the Windows Form Designer
  19. Private components As System.ComponentModel.IContainer
  20.  
  21. 'NOTE: The following procedure is required by the Windows Form Designer
  22. 'It can be modified using the Windows Form Designer.
  23. 'Do not modify it using the code editor.
  24. <System.Diagnostics.DebuggerStepThrough()> _
  25. Private Sub InitializeComponent()
  26. Me.TextBox1 = New System.Windows.Forms.TextBox()
  27. Me.Button1 = New System.Windows.Forms.Button()
  28. Me.Label1 = New System.Windows.Forms.Label()
  29. Me.SuspendLayout()
  30. '
  31. 'TextBox1
  32. '
  33. Me.TextBox1.Location = New System.Drawing.Point(130, 66)
  34. Me.TextBox1.Name = "TextBox1"
  35. Me.TextBox1.Size = New System.Drawing.Size(87, 20)
  36. Me.TextBox1.TabIndex = 0
  37. '
  38. 'Button1
  39. '
  40. Me.Button1.Location = New System.Drawing.Point(130, 127)
  41. Me.Button1.Name = "Button1"
  42. Me.Button1.Size = New System.Drawing.Size(87, 23)
  43. Me.Button1.TabIndex = 1
  44. Me.Button1.Text = "Roll"
  45. Me.Button1.UseVisualStyleBackColor = True
  46. '
  47. 'Label1
  48. '
  49. Me.Label1.AutoSize = True
  50. Me.Label1.BackColor = System.Drawing.Color.Red
  51. Me.Label1.Location = New System.Drawing.Point(132, 50)
  52. Me.Label1.Name = "Label1"
  53. Me.Label1.Size = New System.Drawing.Size(85, 13)
  54. Me.Label1.TabIndex = 2
  55. Me.Label1.Text = "                          "
  56. '
  57. 'Form1
  58. '
  59. Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
  60. Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
  61. Me.ClientSize = New System.Drawing.Size(339, 188)
  62. Me.Controls.Add(Me.Label1)
  63. Me.Controls.Add(Me.Button1)
  64. Me.Controls.Add(Me.TextBox1)
  65. Me.Name = "Form1"
  66. Me.Text = "EFORIE's RANDOM MACHINA"
  67. Me.ResumeLayout(False)
  68. Me.PerformLayout()
  69.  
  70. End Sub
  71. Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
  72. Friend WithEvents Button1 As System.Windows.Forms.Button
  73.  
  74. Private Sub Label1_Click_1(sender As Object, e As EventArgs)
  75.  
  76. End Sub
  77.  
  78. Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  79.  
  80. End Sub
  81.  
  82. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  83. a = (r.Next(0, 15))
  84. TextBox1.Text = a
  85. If a = 0 Then
  86. Label1.BackColor = System.Drawing.Color.Green
  87. End If
  88. If a = 1 Then
  89. Label1.BackColor = System.Drawing.Color.Red
  90. End If
  91. If a = 2 Then
  92. Label1.BackColor = System.Drawing.Color.Red
  93. End If
  94. If a = 3 Then
  95. Label1.BackColor = System.Drawing.Color.Red
  96. End If
  97. If a = 4 Then
  98. Label1.BackColor = System.Drawing.Color.Red
  99. End If
  100. If a = 5 Then
  101. Label1.BackColor = System.Drawing.Color.Red
  102. End If
  103. If a = 6 Then
  104. Label1.BackColor = System.Drawing.Color.Red
  105. End If
  106. If a = 7 Then
  107. Label1.BackColor = System.Drawing.Color.Red
  108. End If
  109. If a = 8 Then
  110. Label1.BackColor = System.Drawing.Color.Black
  111. End If
  112. If a = 9 Then
  113. Label1.BackColor = System.Drawing.Color.Black
  114. End If
  115. If a = 10 Then
  116. Label1.BackColor = System.Drawing.Color.Black
  117. End If
  118. If a = 11 Then
  119. Label1.BackColor = System.Drawing.Color.Black
  120. End If
  121. If a = 12 Then
  122. Label1.BackColor = System.Drawing.Color.Black
  123. End If
  124. If a = 13 Then
  125. Label1.BackColor = System.Drawing.Color.Black
  126. End If
  127. If a = 14 Then
  128. Label1.BackColor = System.Drawing.Color.Black
  129. End If
  130.  
  131. End Sub
  132.  
  133. Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
  134.  
  135. End Sub
  136. Friend WithEvents Label1 As System.Windows.Forms.Label
  137.  
  138. Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click
  139.  
  140. End Sub
  141. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement