Please teach me how can i declared it.
here is my full command.
<Global.Microsoft.VisualBasic.CompilerServices.Des ignerGenerated()> _
Partial Class Form1
Inherits System.Windows.Forms.Form
'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.Button1 = New System.Windows.Forms.Button
Me.Button2 = New System.Windows.Forms.Button
Me.Button3 = New System.Windows.Forms.Button
Me.Button4 = New System.Windows.Forms.Button
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.TextBox2 = New System.Windows.Forms.TextBox
Me.Label1 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.TextBox3 = New System.Windows.Forms.TextBox
Me.Button5 = New System.Windows.Forms.Button
Me.Button6 = New System.Windows.Forms.Button
Me.Button7 = New System.Windows.Forms.Button
Me.Button8 = New System.Windows.Forms.Button
Me.Button9 = New System.Windows.Forms.Button
Me.Button10 = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(214, 32)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(45, 22)
Me.Button1.TabIndex = 0
Me.Button1.Text = "<<"
Me.Button1.UseVisualStyleBackColor = True
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(214, 68)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(45, 23)
Me.Button2.TabIndex = 1
Me.Button2.Text = "<<"
Me.Button2.UseVisualStyleBackColor = True
'
'Button3
'
Me.Button3.Location = New System.Drawing.Point(265, 31)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(42, 24)
Me.Button3.TabIndex = 2
Me.Button3.Text = ">>"
Me.Button3.UseVisualStyleBackColor = True
'
'Button4
'
Me.Button4.Location = New System.Drawing.Point(265, 68)
Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(42, 23)
Me.Button4.TabIndex = 3
Me.Button4.Text = ">>"
Me.Button4.UseVisualStyleBackColor = True
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(90, 31)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(100, 20)
Me.TextBox1.TabIndex = 4
'
'TextBox2
'
Me.TextBox2.Location = New System.Drawing.Point(90, 66)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(100, 20)
Me.TextBox2.TabIndex = 5
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(30, 32)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(14, 13)
Me.Label1.TabIndex = 6
Me.Label1.Text = "X"
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(30, 73)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(14, 13)
Me.Label2.TabIndex = 7
Me.Label2.Text = "Y"
'
'TextBox3
'
Me.TextBox3.Font = New System.Drawing.Font("Lucida Fax", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.TextBox3.ForeColor = System.Drawing.Color.DarkSlateGray
Me.TextBox3.Location = New System.Drawing.Point(33, 122)
Me.TextBox3.Multiline = True
Me.TextBox3.Name = "TextBox3"
Me.TextBox3.Size = New System.Drawing.Size(154, 247)
Me.TextBox3.TabIndex = 8
'
'Button5
'
Me.Button5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button5.ForeColor = System.Drawing.Color.DarkRed
Me.Button5.Location = New System.Drawing.Point(193, 122)
Me.Button5.Name = "Button5"
Me.Button5.Size = New System.Drawing.Size(127, 23)
Me.Button5.TabIndex = 9
Me.Button5.Text = "Clear All"
Me.Button5.UseVisualStyleBackColor = True
'
'Button6
'
Me.Button6.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button6.ForeColor = System.Drawing.Color.Crimson
Me.Button6.Location = New System.Drawing.Point(193, 151)
Me.Button6.Name = "Button6"
Me.Button6.Size = New System.Drawing.Size(127, 23)
Me.Button6.TabIndex = 10
Me.Button6.Text = "Get multiplication"
Me.Button6.UseVisualStyleBackColor = True
'
'Button7
'
Me.Button7.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button7.ForeColor = System.Drawing.SystemColors.HotTrack
Me.Button7.Location = New System.Drawing.Point(193, 180)
Me.Button7.Name = "Button7"
Me.Button7.Size = New System.Drawing.Size(127, 23)
Me.Button7.TabIndex = 11
Me.Button7.Text = "Total from X to Y"
Me.Button7.UseVisualStyleBackColor = True
'
'Button8
'
Me.Button8.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button8.ForeColor = System.Drawing.Color.DarkSlateBlue
Me.Button8.Location = New System.Drawing.Point(193, 209)
Me.Button8.Name = "Button8"
Me.Button8.Size = New System.Drawing.Size(127, 23)
Me.Button8.TabIndex = 12
Me.Button8.Text = "Show odd Number"
Me.Button8.UseVisualStyleBackColor = True
'
'Button9
'
Me.Button9.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button9.ForeColor = System.Drawing.Color.SeaGreen
Me.Button9.Location = New System.Drawing.Point(193, 238)
Me.Button9.Name = "Button9"
Me.Button9.Size = New System.Drawing.Size(125, 23)
Me.Button9.TabIndex = 13
Me.Button9.Text = "Show even Number"
Me.Button9.UseVisualStyleBackColor = True
'
'Button10
'
Me.Button10.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button10.ForeColor = System.Drawing.Color.Red
Me.Button10.Location = New System.Drawing.Point(193, 327)
Me.Button10.Name = "Button10"
Me.Button10.Size = New System.Drawing.Size(121, 42)
Me.Button10.TabIndex = 14
Me.Button10.Text = "Exit"
Me.Button10.UseVisualStyleBackColor = True
'
'Form1
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(338, 397)
Me.Controls.Add(Me.Button10)
Me.Controls.Add(Me.Button9)
Me.Controls.Add(Me.Button8)
Me.Controls.Add(Me.Button7)
Me.Controls.Add(Me.Button6)
Me.Controls.Add(Me.Button5)
Me.Controls.Add(Me.TextBox3)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.TextBox2)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.Button4)
Me.Controls.Add(Me.Button3)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Button1)
Me.Name = "Form1"
Me.Text = "Multiplication"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents Button3 As System.Windows.Forms.Button
Friend WithEvents Button4 As System.Windows.Forms.Button
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
Friend WithEvents Button5 As System.Windows.Forms.Button
Friend WithEvents Button6 As System.Windows.Forms.Button
Friend WithEvents Button7 As System.Windows.Forms.Button
Friend WithEvents Button8 As System.Windows.Forms.Button
Friend WithEvents Button9 As System.Windows.Forms.Button
Friend WithEvents Button10 As System.Windows.Forms.Button
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim X As Integer
X = CInt(TextBox1.Text)
X = X - 1
TextBox1.Text = X
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim X As Integer
X = CInt(TextBox1.Text)
X = X + 1
TextBox1.Text = X
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim Y As Integer
Y = CInt(TextBox2.Text)
Y = Y - 1
TextBox2.Text = Y
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim Y As Integer
Y = CInt(TextBox2.Text)
Y = Y + 1
TextBox2.Text = Y
End Sub
Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
Me.Close()
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Dim X As Integer
Dim Y As Integer
Dim multiplication As Integer
X = CInt(TextBox1.Text)
Y = CInt(TextBox2.Text)
For X = 1 To 12
multiplication = X * Y
ListBox1.Items.Add(X & "X" & Y & "=" & multiplication)
Next
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
ListBox1.Items.Clear()
TextBox1.Text = ""
TextBox2.Text = ""
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
Dim X As Integer
Dim Y As Integer
Dim total As Integer
X = CInt(TextBox1.Text)
Y = CInt(TextBox2.Text)
For i = X To Y
total = total + i
Next
ListBox1.Items.Add(total)
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
Dim num, X, Y As Integer
X = CInt(TextBox1.Text)
Y = CInt(TextBox2.Text)
For num = X To Y
If num Mod 2 <> 0 Then
ListBox1.Items.Add(num)
num = num + 1
End If
Next
End Sub
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
Dim num, X, Y As Integer
X = CInt(TextBox1.Text)
Y = CInt(TextBox2.Text)
For num = X To Y
If num Mod 2 <> 1 Then
ListBox1.Items.Add(num)
num = num + 1
End If
Next
End Sub
End Class
it started from button 5 .which includes clear list, get multiplication, get odd and even number and get total from X and Y.
these all it said error of listbox undeclared. how can i declared it. please show me. thank you very much