Access Millions of academic & study documents

Visual Codes For Begginers

Content type
User Generated
Subject
.NET
Type
Homework
Showing Page:
1/15
Surname 1
Name
Instructor
Institution
Course
Date
Updated Code:
' Name: Multiplication Project
' Purpose: Display a multiplication table that shows
' the multiplicand, multiplier, and product
' Programmer: <your name> on <current date>
Option Explicit On
Option Strict On
Option Infer Off
Public Class frmMain
' For holding number
Dim num As Integer
' For storing result
Dim result As String

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/15
Surname 2
' Emptying result
result = String.Empty
' Reading value from text box
If Integer.TryParse(txtNumber.Text, num) Then
Dim i As Integer = 1
' Loop from 1 to 9
Do
' Adding items to result string
result &= num.ToString() & " * " & i.ToString() + " = " & (num * i).ToString()
& vbnewline
' Incrementing i value
i += 1
Loop While (i < 10)
' Writing data to label
lblTable.Text = result
Else
' If non numeric value is entered
MessageBox.Show("Only numeric... ")
End If
End Sub

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/15

Sign up to view the full document!

lock_open Sign Up
End of Preview - Want to read all 15 pages?
Access Now
Unformatted Attachment Preview
Surname 1 Name Instructor Institution Course Date Updated Code: ' Name: Multiplication Project ' Purpose: Display a multiplication table that shows ' the multiplicand, multiplier, and product ' Programmer: on Option Explicit On Option Strict On Option Infer Off Public Class frmMain ' For holding number Dim num As Integer ' For storing result Dim result As String Surname 2 ' Emptying result result = String.Empty ' Reading value from text box If Integer.TryParse(txtNumber.Text, num) Then Dim i As Integer = 1 ' Loop from 1 to 9 Do ' Adding items to result string result &= num.ToString() & " * " & i.ToString() + " = " & (num * i).ToString() & vbnewline ' Incrementing i value i += 1 Loop While (i < 10) ' Writing data to label lblTable.Text = result Else ' If non numeric value is entered MessageBox.Show("Only numeric... ") End If End Sub Surname 3 ' For holding number Dim num As Integer ' For storing result Dim result As String ' Emptying result result = String.Empty ' Reading value from text box If Integer.TryParse(txtNumber.Text, num) Then ' Loop from 1 to 9 For i = 1 To 9 ' Adding data to label result &= num.ToString() & " * " & i.ToString() + " = " & (num * i).ToString() & vbnewline Next ' Writing data to label lblTable.Text = result Surname 4 Else ' If non numeric value is entered MessageBox.Show("Only numeric... ") End If End Sub Private Sub txtNumber_Enter(sender As Object, e As EventArgs) Handles txtNumber.Enter txtNumber.Sel ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Studypool
4.7
Indeed
4.5
Sitejabber
4.4