Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
- Partial Class Form1
- Inherits System.Windows.Forms.Form
- Dim r As New Random
- Dim a As Long
- 'Form overrides dispose to clean up the component list.
- <System.Diagnostics.DebuggerNonUserCode()> _
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
- 'NOTE: The following procedure is required by the Windows Form Designer
- 'It can be modified using the Windows Form Designer.
- 'Do not modify it using the code editor.
- <System.Diagnostics.DebuggerStepThrough()> _
- Private Sub InitializeComponent()
- Me.TextBox1 = New System.Windows.Forms.TextBox()
- Me.Button1 = New System.Windows.Forms.Button()
- Me.Label1 = New System.Windows.Forms.Label()
- Me.SuspendLayout()
- '
- 'TextBox1
- '
- Me.TextBox1.Location = New System.Drawing.Point(130, 66)
- Me.TextBox1.Name = "TextBox1"
- Me.TextBox1.Size = New System.Drawing.Size(87, 20)
- Me.TextBox1.TabIndex = 0
- '
- 'Button1
- '
- Me.Button1.Location = New System.Drawing.Point(130, 127)
- Me.Button1.Name = "Button1"
- Me.Button1.Size = New System.Drawing.Size(87, 23)
- Me.Button1.TabIndex = 1
- Me.Button1.Text = "Roll"
- Me.Button1.UseVisualStyleBackColor = True
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.BackColor = System.Drawing.Color.Red
- Me.Label1.Location = New System.Drawing.Point(132, 50)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(85, 13)
- Me.Label1.TabIndex = 2
- Me.Label1.Text = " "
- '
- 'Form1
- '
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(339, 188)
- Me.Controls.Add(Me.Label1)
- Me.Controls.Add(Me.Button1)
- Me.Controls.Add(Me.TextBox1)
- Me.Name = "Form1"
- Me.Text = "EFORIE's RANDOM MACHINA"
- Me.ResumeLayout(False)
- Me.PerformLayout()
- End Sub
- Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
- Friend WithEvents Button1 As System.Windows.Forms.Button
- Private Sub Label1_Click_1(sender As Object, e As EventArgs)
- End Sub
- Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- End Sub
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- a = (r.Next(0, 15))
- TextBox1.Text = a
- If a = 0 Then
- Label1.BackColor = System.Drawing.Color.Green
- End If
- If a = 1 Then
- Label1.BackColor = System.Drawing.Color.Red
- End If
- If a = 2 Then
- Label1.BackColor = System.Drawing.Color.Red
- End If
- If a = 3 Then
- Label1.BackColor = System.Drawing.Color.Red
- End If
- If a = 4 Then
- Label1.BackColor = System.Drawing.Color.Red
- End If
- If a = 5 Then
- Label1.BackColor = System.Drawing.Color.Red
- End If
- If a = 6 Then
- Label1.BackColor = System.Drawing.Color.Red
- End If
- If a = 7 Then
- Label1.BackColor = System.Drawing.Color.Red
- End If
- If a = 8 Then
- Label1.BackColor = System.Drawing.Color.Black
- End If
- If a = 9 Then
- Label1.BackColor = System.Drawing.Color.Black
- End If
- If a = 10 Then
- Label1.BackColor = System.Drawing.Color.Black
- End If
- If a = 11 Then
- Label1.BackColor = System.Drawing.Color.Black
- End If
- If a = 12 Then
- Label1.BackColor = System.Drawing.Color.Black
- End If
- If a = 13 Then
- Label1.BackColor = System.Drawing.Color.Black
- End If
- If a = 14 Then
- Label1.BackColor = System.Drawing.Color.Black
- End If
- End Sub
- Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
- End Sub
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement