VB Lab Full Programs Record
VB Lab Full Programs Record
OBJECT
DATE: MARKSHEET PROCESSING
AIM:
PROCEDURE:
PROPERTY SETTINGS:
Text1 Text
Text2 Text
Text3 Text
Text4 Text
Text5 Text
Text6 Text
Text7 Text
Textbox Text8 Text
Dim s As string
S1=val(txtsub1.text)
S2=val(txtsub2.text)
S3=val(txtsub3.text)
S4=val(txtsub4.text)
S5=val(txtsub5.text)
Tot=s1+s2+s3+s4+s5
Per=tot/5
Txttot.text=tot
Txtper.text=per
If s1>40 And s2>40 And s3>40 And s4>40 And s5>40 Then
Case Is>90
Grade=”H”
Case Is>60
Grade=”A”
Case Is>50
Grade=”B”
Case Is>35
Grade=”C”
End select
Txtgra.text=grade
S=txtgra.text
Select case S
Case “H”
Lblrem.caption=”Excellent”
Case”A”
Lblrem.caption=”very good”
Case”B”
Lblrem.caption=”good”
Case”C”
Lblrem.caption=”Average”
End select
Else
Txtgra.text=”F”
Lblrem.caption=”Fail”
End If
End sub
Private sub cmdclr_click()
Txtsub1.text= “ ”
Txtsub2.text= “ ”
Txtsub3.text= “ ”
Txtsub4.text= “ ”
Txtsub5.text= “ ”
Txttot.text= “ ”
Txtper.text= “ ”
Txtgra.text= “ ”
Lblrem.caption=“ ”
End sub
Txtgra.Enabled=False
End sub
OUTPUT:
RESULT:
EX NO: 2 WORKING WITH INTRINSIC CONTROLS
DATE: STUDENT INFORMATION SYSTEM
AIM:
PROCEDURE:
PROPERTY SETTINGS:
End If
If (Txtadd.Text = " ") Then
End If
If (listya.Text = " ") Then
End If
If (Comcourse.Text = " ") Then
End If
End If
opfemale.Value = False
End Sub
End
End Sub
OUTPUT:
RESULT:
EX NO:3 APPLICATION WITH MENUS
DATE:
AIM:
PROCEDURE:
PROPERTY SETTINGS:
Form1.BackColor = &H00000000&
End Sub
Form1.BackColor = &H00FFF00&
MsgBox (" Its a Light Blue Color")
End Sub
End
End Sub
Form1.BackColor = &H0000FF00&
MsgBox (" Its a Green Color")
End Sub
End Sub
Form1.BackColor = &H000000FF&
MsgBox (" Its a Red Color")
End Sub
End Sub
OUTPUT:
RESULT:
EX NO:4 APPLICATION WITH MDI
DATE:
AIM:
PROCEDURE:
PROPERTY SETTINGS:
Text1 Text
Microsoft Common
Dialog Control 6.0
RESULT:
EX NO:5 CREATE A SIMPLE CALCULATOR USING
DATE: WINDOWS COMMON CONTROLS
AIM:
PROCEDURE:
PROPERTY SETTINGS:
Command1 caption 1
Command2 caption 2
Command3 Caption 3
Command Button Command3 Name cmdThree
Command4 Caption 4
Command5 Caption 5
Command6 Caption 6
Command7 Caption 7
Command8 Caption 8
Command9 Caption 9
Command9 Name cmdNine
Command10 Caption 0
Command11 Caption C
Command13 Caption *
Command Button Command13 Name cmdmul
Command14 Caption /
Command15 Caption -
Command16 Caption +
Command17 Caption .
Command19 Caption =
Option Explicit
txtresult.Text = ""
End Sub
operator1 = "/"
txtresult.Text = ""
End Sub
Exit Sub
Else
End If
End Sub
Private Sub cmdeight_Click()
End Sub
operand2 = Val(txtresult.Text)
End If
End If
End If
End If
End If
txtresult.Text = result
End Sub
End Sub
End Sub
operator1 = "-"
txtresult.Text = ""
End Sub
operand1 = Val(txtresult.Text)
operator1 = "Mod"
txtresult.Text = ""
End Sub
Private Sub cmdmul_Click()
operand1 = Val(txtresult.Text)
operator1 = "*"
txtresult.Text = ""
End Sub
End Sub
End Sub
operand1 = Val(txtresult.Text)
operator1 = "+"
txtresult.Text = ""
End Sub
End Sub
Private Sub cmdsix_Click()
End Sub
End If
End Sub
End Sub
End Sub
End Sub
OUTPUT:
24
RESULT:
EX NO:6 BLOCK FOR FACTORIAL USING FUNCTION
DATE:
AIM:
PROCEDURE:
PROPERTY SETTINGS:
Factorial Of a
Label1 Caption Number
Dim j, I As Integer
I = CInt(txtno.Text)
End Sub
F=1
For j = 1 To I
F=F*j
FACTS = F
Next j
End Function
txtno.Text = ""
txtno.SetFocus
End Sub
Unload Me
End Sub
OUTPUT:
RESULT:
EX NO: 7 PAY-ROLL SYSTEM
DATE:
AIM:
PROCUDURE:
PROPERTY SETTINGS:
CONTROL NAME PROPERTY VALUE
Command1 Name Cmdclc
Command2 Name Cmdclose
Command button Command1 Caption Calculate
Command2 Caption Close
Text1 Name Txtbp
Text2 Name Txthra
Text3 Name Txtcon
Text4 Name Txtall
Text5 Name Txtgp
Text6 Name Txtpf
Text7 Name Txtlic
Text8 Name Txtemi
Text9 Name Txtdet
Text10 Name Txtnp
Text1 Text
Textbox
Text2 Text
Text3 Text
Text4 Text
Text5 Text
Text6 Text
Text7 Text
Text8 Text
Text9 Text
Text10 Text
Label1 Caption Payroll Processing
Label2 Caption Basic pay
Label3 Caption HRA(15%)
Label4 Caption DA(40%)
Label
Label5 Caption Conveyance(10%)
Label6 Caption LIC
Label7 Caption Income Tax
Label8 Caption Loans
Label9 Caption Others
Label10 Caption Gross Salary
Label11 Caption Net Salary
Frame1 Caption Allowance
Frame Frame2 Caption Deduction
FORM DESIGN:
SOURCE CODE:
Txtbp.setfocus
End if
Txthra.text=val(txtbp.text)*10/100
Txtcon.text=val(txtbp.text)*20/100
Txtall.text=val(txthra.text)+val(txtcon.text)
Txtgp.text=val(txtbp.text)+val(txtall.text)
Txtdet.text=val(txtpf.text)+val(txtlic.text)+val(txtemi.text)
Txtnp.text=val(txtgp.text)-val(txtdet.text)
End sub
RESULT:
EX NO: 8 INVENTARY PROCESSING SYSTEM
DATE:
AIM:
PROCUDURE: