The program uses vb.net to make a small program (2)
----make "Lucky7" program
Author: Alpine
It is a simulation of the lucky Digital coin machine game program. The program's user interface includes two buttons, 3 Lucky number boxes that represent winning digital images and Lucky 7 tags.
Public Class Form1
Inherits System.Windows.Forms.Form
#Region "code generated by the Windows forms Designer"
Public Sub New ()
MyBase.New ()
' This call is required by the Windows Forms Designer.
InitializeComponent ()
' Add any initialization after the InitializeComponent () call
End Sub
' Form overrides disposition to clean up the component list.
Protected Overloads Overrides Sub Dispose (ByVal disposing as Boolean)
If disposing Then
If not (components are nothing) Then
Components. Dispose ()
End If
End If
Mybase.dispose (disposing)
End Sub
' Required by the Windows Forms Designer
Private Components as System.ComponentModel.IContainer
' NOTE: The following procedure is required by the Windows Forms Designer
' You can use the Windows Forms Designer to modify this procedure.
' Do not modify it using the Code Editor.
Friend WithEvents Button1 as System.Windows.Forms.Button
Friend WithEvents Button2 as System.Windows.Forms.Button
Friend WithEvents Label1 as System.Windows.Forms.Label
Friend WithEvents Label2 as System.Windows.Forms.Label
Friend WithEvents Label3 as System.Windows.Forms.Label
Friend WithEvents Label4 as System.Windows.Forms.Label
Friend WithEvents PictureBox1 as System.Windows.Forms.PictureBox
<system.diagnostics.debuggerstepthrough () > Private Sub InitializeComponent ()
Dim resources as System.Resources.ResourceManager = New System.Resources.ResourceManager (GetType (FORM1))
Me.button1 = New System.Windows.Forms.Button ()
Me.button2 = New System.Windows.Forms.Button ()
Me.label1 = New System.Windows.Forms.Label ()
Me.label2 = New System.Windows.Forms.Label ()
Me.label3 = New System.Windows.Forms.Label ()
Me.label4 = New System.Windows.Forms.Label ()
Me.picturebox1 = New System.Windows.Forms.PictureBox ()
Me.suspendlayout ()
'
' Button1
'
Me.Button1.Location = New System.Drawing.Point (40, 104)
Me.Button1.Name = "Button1"
Me.Button1.TabIndex = 0
Me.Button1.Text = "Spin"
'
' Button2
'
Me.Button2.Location = New System.Drawing.Point (40, 152)
Private Sub Label3_click (ByVal sender as System.Object, ByVal e as System.EventArgs) Handles Label3.click
End Sub
Private Sub button2_click (ByVal sender as System.Object, ByVal e as System.EventArgs) Handles Button2.click
End
End Sub
Private Sub button1_click (ByVal sender as System.Object, ByVal e as System.EventArgs) Handles Button1.Click
picturebox1.visible = False ' Hide picture
The ' Rnd function generates a random number between 0 and 1 (with a decimal point and several decimal places), and the INT function multiplies these numbers by 10
' After multiplying by 10 and rounding up an integer, this produces a random integer of 0 to 9.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.