Source Code For Students Marklist
Source Code For Students Marklist
Source Code For Students Marklist
Imports System.windows.forms
Module Module1
Sub Main( )
Dim mark1 As Integer
Dim mark2 As Integer
Dim mark3 As Integer
Dim mark4 As Integer
Dim total As Integer
Dim average As Integer
Dim status As String = "Pass"
Dim name As String
Console.Write("Enter a Student Name: ")
name = Console.ReadLine( )
Console.Write("Enter marks for the subject Tamil: ")
mark1 = Console.ReadLine( )
If mark1 < 35 Then
status = "Fail"
End If
Console.Write("Enter marks for the subject English: ")
mark2 = Console.ReadLine( )
If mark2 < 35 Then
status = "Fail"
End If
Console.Write("Enter marks for the subject Maths: ")
mark3 = Console.ReadLine( )
If mark3 < 35 Then
status = "Fail"
End If
Console.Write("Enter marks for the subject Science: ")
mark4 = Console.ReadLine( )
If mark4 < 35 Then
status = "Fail"
End If
total = mark1 + mark2 + mark3 + mark4
Console.WriteLine("Total Marks: " & total)
average = total / 4
Console.WriteLine("Average: " & average)
MessageBox.Show("Student Got " & status)
Console.ReadKey( )
End Sub
End Module
OUTPUT
Case 4
Exit Do
End Select
Loop
ReadLine( )
End Sub
End Module
OUTPUT
Run 2
OUTPUT
FORM DESIGN
TextBox1.Text = ""
ArithmeticProcess = "/"
End Sub
Private Sub Buttonequal_Click(sender As System.Object, e As System.EventArgs)
Handles Buttonequal.Click
SecondNumber = Val(TextBox1.Text)
If ArithmeticProcess = "+" Then
AnswerNumber = FirstNumber + SecondNumber
End If
If ArithmeticProcess = "-" Then
AnswerNumber = FirstNumber - SecondNumber
End If
If ArithmeticProcess = "X" Then
AnswerNumber = FirstNumber * SecondNumber
End If
If ArithmeticProcess = "/" Then
AnswerNumber = FirstNumber / SecondNumber
End If
TextBox1.Text = AnswerNumber
End Sub
Private Sub ButtonC_Click(sender As System.Object, e As System.EventArgs) Handles
ButtonC.Click
TextBox1.Text = "0" 'Enable to clear
End Sub
Private Sub Buttonbk_Click(sender As System.Object, e As System.EventArgs) Handles
Buttonbk.Click
Dim str As String
Dim len As Single
str = TextBox1.Text
len = str.Length
TextBox1.Text = ""
TextBox1.Text = str.Substring(0, len - 1)
End Sub
End Class
OUTPUT
FORM DESIGN
FORM 2
Public Class Form2
Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles
LinkLabel1.LinkClicked
Me.Close( )
Form1.Show( )
End Sub
End Class
OUTPUT
FORM DESIGN
Run 2
FORM DESIGN
OUTPUT
FORM DESIGN
End Sub
Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles SaveToolStripMenuItem.Click
SaveFileDialog1.ShowDialog( )
My.Computer.FileSystem.WriteAllText(SaveFileDialog1.FileName,
RichTextBox1.Text, False)
End Sub
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ExitToolStripMenuItem.Click
End
End Sub
Private Sub UndoToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles UndoToolStripMenuItem.Click
If RichTextBox1.CanUndo Then
RichTextBox1.Undo( )
End If
End Sub
Private Sub CutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles CutToolStripMenuItem.Click
If RichTextBox1.SelectionLength > 0 Then
My.Computer.Clipboard.SetText(RichTextBox1.SelectedText)
End If
RichTextBox1.SelectedText = ""
End Sub
Private Sub CopyToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles CopyToolStripMenuItem.Click
If RichTextBox1.SelectionLength > 0 Then
My.Computer.Clipboard.SetText(RichTextBox1.SelectedText)
End If
End Sub
Private Sub PasteToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles PasteToolStripMenuItem.Click
If My.Computer.Clipboard.ContainsText Then
RichTextBox1.Paste( )
End If
End Sub
OUTPUT
FORM DESIGN
OUTPUT