Professional Documents
Culture Documents
Index
S.No Date Name of the Experiment Page No
1 24-07-2019 Introduction to M.S. Access
2 14-08-2019 Form Creation for Customer Details
3 04-09-2019 Report Generation for Employee table
4 11-09-2019 Display Different Shapes
5 18-09-2019 Simple Interest
6 16-10-2019 Changing Background and Foreground
Colour at Random
7 23-10-2019 Mathematical Table
8 30-10-2019 Display Calendar
Page 1 of 9
1. Display Different Shapes
Aim: To design a Visual Basic Application, to display different shapes using shape control.
Procedure:
Step1: Select start button → All Programs →Microsoft Visual Studio 6.0→Microsoft Visual
Basic6.0
Step2: In new project window select standard exe icon and click on open button.
Step3: Using the tool box insert one Label, Seven Command buttons and one Shape tool
and arrange all the controls in a meaningful manner.
Step4: Using the properties window change the properties of different controls in the
following manner.
Step5: Open the code window using the view →code option and write the following code.
Page 2 of 9
Shape1.Shape = 5
End Sub
Private Sub Command7_Click()
End
End Sub
Step6: Save the project using the File menu →Save Project command. And also save the
form as same way.
Step7: Run the form using Run menu→ Start Command or press F5 from keyboard.
Out Put:
2. Simple Interest
Aim: To Create a project to calculate Simple Interest using Visual Basic6.0.
Procedure:
Step1: Select start button → All Programs →Microsoft Visual Studio 6.0→Microsoft Visual
Basic6.0
Step2: In new project window select standard exe icon and click on open button.
Step3: Using the tool box inserts 5 Labels, 3 Command buttons and 4 Text Boxes and
arranges all the controls in a meaningful manner.
Step4: Using the properties window change the properties of different controls in the
following manner.
Page 3 of 9
Control Property Value
Label1 Caption Simple Interest
Label1 Font style & size 18
Label2 Caption Enter Principle Amount
Label3 Caption Enter time period
Label4 Caption Enter Rate of Interest
Label5 Caption Simple Interest Is
Text1 Name P
Text1 Text (Remove all The data) Empty
Text2 Name Q
Text2 Text (Remove all The data) Empty
Text3 Name R
Text3 Text (Remove all The data) Empty
Text4 Name SI (Simple Interest)
Text4 Text (Remove all The data) Empty
Command1 Caption Calculate
Command2 Caption Clear
Command3 Caption Quit
Step5: Open the code window using the view →code option and write the following code.
Step6: Save the project using the File menu →Save Project command. And also save the
form as same way.
Step7: Run the form using Run menu→ Start Command or press F5 from keyboard.
Step8: Enter the values for the required text boxes and press “Calculate “button then it
displays simple Interest.
Step9: To clear the value of the text boxes press “Clear “button.
Page 4 of 9
Out Put:
Procedure:
Step1: Select start button → All Programs →Microsoft Visual Studio 6.0→Microsoft Visual
Basic6.0
Step2: In new project window select standard exe icon and click on open button.
Step3: Using the tool box inserts 1 Label and 3 Command buttons and arranges all the
controls in a meaningful manner.
Step4: Using the properties window change the properties of different controls in the
following manner.
Step5: Open the code window using the view →code option and write the following code.
Page 5 of 9
Private Sub Cmd_bgcolor_Click()
Dim r, g, b As Integer
r = Int(Rnd() * 256)
g = Int(Rnd() * 256)
b = Int(Rnd() * 256)
MyForm.BackColor = RGB(r, g, b)
End Sub
End Sub
Step6: Save the project using the File menu →Save Project command. And also save the
form as same way.
Step7: Run the form using Run menu→ Start Command or press F5 from keyboard.
Out Put:
Page 6 of 9
4. Mathematical Table
Procedure:
Step1: Select start button → All Programs →Microsoft Visual Studio 6.0→Microsoft Visual
Basic6.0
Step2: In new project window select standard exe icon and click on open button.
Step3: Using the tool box inserts 1 Text box, 1 List box and 2 Command buttons and
arranges all the controls in a meaningful manner.
Step4: Using the properties window change the properties of different controls in the
following manner.
Step7: Run the form using Run menu→ Start Command or press F5 from keyboard.
Page 7 of 9
Out Put:
5. Display Calendar
Aim: To create a Visual Basic Application to display a calendar for a given month and
year.
Procedure:
Step1: Select start button → All Programs →Microsoft Visual Studio 6.0→Microsoft Visual
Basic6.0
Step2: In new project window select standard exe icon and click on open button.
Step3: Using the tool box inserts 1 Label, 3 Command buttons and 1 Calendar control in the
form and arranges all the controls in a meaningful manner.
Step4: Select Project menu → Components → Controls→ Microsoft Calendar Control 8.0
and click on Check box and then Click on Apply/ Ok button.
Step5: Using the properties window change the properties of different controls in the
following manner.
Step6: Open the code window using the view →code option and write the following code.
Page 8 of 9
Private Sub Command1_Click()
Dim y As Integer
y = InputBox("Enter Year(YYYY)")
If (y < 1900) Then
MsgBox (Val(y) & " is Invalid Year, Please enter valid year")
Else
MsgBox (Val(y) & " is Valid Year")
Calendar1.Year = Val(y)
End If
End Sub
Step7: Save the project using the File menu →Save Project command. And also save the
form as same way.
Step8: Run the form using Run menu→ Start Command or press F5 from keyboard.
Out Put:
Page 9 of 9