WELLCOME

Visual Basic is a very easy and powerful programming language, a very simple coding of the software can be created with Visual Basic. I have my Blogger (http://www.vbcodebd.blogspot.com) in Visual basic 6.0 via kinds Program will discuss the code. Thanks All ..........

Monday, February 11, 2013

Cgpa Project code (Visual Basic Tutorial - 12)





Create a form with      1 text boxe , 3 Label , And 1 command button.



Label properties…………..
Label1 Caption- Mark
Label1 Caption- Great point
Label1 Caption- Leatter Great

Command buttons properties…………..
Command buttons 1 - Caption: Show Result

Add the following code to the form code module for the Formr1 _Click event:

Program code:

Private Sub Command1_Click()
Dim a
a = Val(Text1)
If a >= 80 And a <= 100 Then
Text2 = 5
Text3 = "A+"
ElseIf a >= 70 And a <= 79 Then
Text2 = 4
Text3 = "A"
ElseIf a >= 60 And a <= 69 Then
Text2 = 3.5
Text3 = "A-"
ElseIf a >= 50 And a <= 59 Then
Text2 = 3
Text3 = "B"
ElseIf a >= 40 And a <= 49 Then
Text2 = 2
Text3 = "C"
ElseIf a >= 33 And a <= 39 Then
Text2 = 1
Text3 = "D"
Else
Text2 = 0
Text3 = "F"
End If
End Sub
……………………………………………………

No comments:

Post a Comment