Thursday, March 19, 2020

Find to Mark Grade program in VB6.0 ?



Steps Find to Mark Grade in VB6.0 program.

1.Set 7 Labels, 6 TextBox ,  CommandButton






Source code :-

Private Sub Command1_Click()
Text5.Text = Val(Text2.Text) + Val(Text3.Text) + Val(Text4.Text)
If Text5.Text > 500 Then
Text6.Text = "Distinction"
ElseIf Text5.Text > 450 Then
Text6.Text = "First Class"
ElseIf Text5.Text > 400 Then
Text6.Text = "Second Class"
ElseIf Text5.Text > 350 Then
Text6.Text = "Third Class"
ElseIf Text5.Text > 250 Then
Text6.Text = "Passed"
Else: Text6.Text = " failed"
End If
End Sub

Private Sub Form_Load()
Label1.FontSize = 30
Label1.Font = "Arial"
Label1.Caption = "Mark Grade"
Label2.FontSize = 20
Label2.Font = "Arial"
Label2.Caption = "Student Name"
Label3.FontSize = 20
Label3.Font = "Arial"
Label3.Caption = "English"
Label4.FontSize = 20
Label4.Font = "Arial"
Label4.Caption = "Science"
Label5.FontSize = 20
Label5.Font = "Arial"
Label5.Caption = "Malayalam"
Label6.FontSize = 20
Label6.Font = "Arial"
Label6.Caption = "Total"
Label7.FontSize = 20
Label7.Font = "Arial"
Label7.Caption = " Grade"
Command1.FontSize = 20
Command1.Font = "Arial"
Command1.Caption = "Check Grade"

End Sub




No comments:

Post a Comment