Professional Documents
Culture Documents
of CS,SACWC,CUMBUM 1
S.NO CONTENT
1. Arithmetic Function
2. String Length Calculation
3. Login Form
4. Bio Data
5. List Box
6. Food Menu using Check Box
&
Option Button
13. Chelan
DATE:
ARITHMETIC FUNCTION
AIM :
ALGORITHM:
STEP 2: Place three table box, three text box five command button on the form.
STEP 3: Change the properties of the objects in the form using property window.
STEP 4: In the code window, place the corresponding code with in the corresponding
Objects.
End Sub
End Sub
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub
End
End Sub
OUT PUT:
RESULT:
Thus the program has been successfully executed
EX NO: 2
STRING LENGTH CALCULATION
DATE:
AIM:
To create a program for string length calculation using visual basic 6.0
ALGORITHM:
STEP 2: Place three tables, two text boxes and three command buttons Within a form.
STEP 3: Change the required properties the object in the form using property Window.
STEP 4: In the code window place the corresponding code with in the Corresponding
object.
Dim STR As
string Dim I As
string
STR =Text1.Text
1 =Len (STR)
Text2. Text =
1 End sub
Text 1.Text = “”
Text 2.Text= “”
End sub
End
End sub
OUTPUT:
RESULT:
Thus the program has been executed successfully.
EX.NO:3
DATE:
LOGIN FORM
AIM:
ALGORITHM:
STEP 1: Start the execution.
STEP 2: Place three lables, 2 text boxes, three command buttons within the form.
STEP 3: Change the required properties the object in the form using property Window.
STEP 4: In the code window, place the corresponding code in the Corresponding objects.
Msg box
“welcome” Else
End if
Else
Msg box
“recorite” End if
End sub
Text 1.Text = “”
Text 2.Text= “”
End sub
End
End sub
OUTPUT:
RESULT:
AIM:
ALGORITHM:
STEP 1: Start the execution .
STEP 2: Place the text box any five, label box, two command button within the form.
STEP 3: Change the required properties the objects in the form using property window.
STEP 4: In the code window place the corresponding code within the corresponding objects.
STEP 5: Run the program.
STEP 6: Stop the program.
FORM DESIGN:
CODINGS:
Private sub command 1_click
Text 10.Text=Text
Text 1. Text = “”
Text 2. Text = “”
Text 3. Text = “”
Text 4. Text = “”
Text 5. Text= “”
Text 6. Text = “”
Text 7. Text= “”
Text 8. Text= “”
Text 9. Text = “”
End sub
End
End sub
OUTPUT:
RESULT:
AIM:
To create a program for list box from using visual basic.
ALGORITHM:
STEP 4: Add three command button and change the caption as Add, delete and clear.
STEP 5: In the code window place the corresponding code within the corresponding
objects.
STEP 6: Save the project and run the program whenever you want.
FORM DESIGN:
CODINGS:
Private Sub Command1_Click
() list1.AddItem Text1.Text
Text1.Text = ""
Text1.SetFocus
lblcount.Caption = list1.ListCount
End Sub
ind = list1.ListIndex
List1.RemoveItem ind
lblcount.Caption = List.ListCount
End If
End Sub
list1.Clear
lblcount.Caption = List.ListCount
End Sub
End Sub
OUTPUT:
RESULT :
AIM:
ALGORITHM:
STEP 4: In the code window place the corresponding code within the corresponding
object.
STEP 5: Save the project and run the program whenever you want .
FORM DESIGN:
CODINGS:
Private Sub Check1_Click()
If Check1.Value Then
FASTFOODS = "burger"
End If
End Sub
If Option2.Value Then
MsgBox "MEDIUM IS NOT AVAILABLE"
End If
If Option3.Value Then
MsgBox "LARGE IS NOT AVAILABLE"
End If
End If
If Check2.Value Then
FASTFOODS = "SHAWARMA"
If Option1.Value Then
MsgBox "SMALL IS AVAILABLE"
End If
If Option2.Value Then
MsgBox "MEDIUM IS AVAILABLE"
End If
If Option3.Value Then
MsgBox "LARGE IS NOT AVAILABLE"
End If
End If
If Check3.Value Then
FASTFOODS = "PIZZA"
If Option1.Value Then
MsgBox "SMALL IS AVAILABLE"
End If
If Option2.Value Then
MsgBox "MEDIUM IS AVAILABLE"
End If
If Option3.Value Then
MsgBox "LARGE IS AVAILABLE"
End If
End If
If Check4.Value Then
FASTFOODS = "CHEESE PIZZA"
If Option1.Value Then
MsgBox "SMALL IS AVAILABLE"
End If
If Option2.Value Then
MsgBox "MEDIUM IS AVAILABLE"
End If
If Option3.Value Then
MsgBox "LARGE IS NOT AVAILABLE"
End If
End If
End Sub
AIM :
To create a program for advertisement and animation from using visual basic.
ALGORITHAM :
STEP 3 : Specify the required interval for timer in the property window .
.
FROM DESIGN:
CODINGS:
Timer1.Interval = 0
End Sub
Private Sub
go_Click()
Timer1.Interval = 100
End Sub
Private Sub
name_Click() name =
name()
End Sub
Private Sub
stop_Click()
Timer1.Interval = 0
End Sub
price = price()
End Sub
100
If Frame1.Left > Me.Width Then
Frame1.Left = 0
End If
End Sub
OUTPUT:
RESULT:
AIM :
ALGORITHM :
STEP 2 : By right clicking the form window choose the menu editor option.
STEP 3 : Write the coding for the subtitle of the menu titles.
STEP 5: Check the exclusion of the menu option by the running the program
using.
STEP 7 : End
theprogram.
FORM DESIGNIG:
CODINGS:
Private sub mnucenter_ click ()
Richtextbox1 . selAlignment
=2 End sub
End
End sub
Clipboard . GetData
End sub
Clipboard . Clear
End if
End sub
Richtextbox 1 . Sellenght =” “
End sub
Private sub mnuleft _ click ()
Richtextbox 1 . selAlighment =
0 End sub
() Richtextbox 1 . text = “ “
End sub
End sub
() Richtextbox 1 . seltext = “ “
End sub
Richtextbox 1 . selAlighment = 0
End sub
() Richtextbox 1 . text = “ “
End sub
End sub
Richtextbox 1 . selAlighment = 1
End sub
commonDialog 1 . filename
X= commonDiologal .
filename Richtextbox 1.
Savefile X
End sub
Richtextbox 1 . SelStart = 0
End sub
OUTPUT:
RESULT:
ALGORITHM :
STEP 4 : And then select project -→components -→microsoft flex grid control 6.0 .
want .
STEP 7 : And then put “exit “ command button in the bottom and save the project.
End
End sub
() For I =1 to 9
For j =1 to 9
Ms flexgrid 1 . row = i
Msflexgrid 1 . col = j
Msflexgrid 1 . text = If “ *
“ Next i
Next j
End sub
OUTPUT:
RESULT :
AIM :
To compare the two super market details using chart in visual basic.
ALGORITHM:
STEP 2 : Design the from and place the three command button .
Text) MSChart 1 =g
MSChart 1.Row=1
MSChart 1.Row=2
MSChart 1 . column = 1
MSChart 1 .column =2
“ End sub
Text 1 . Text =” “
Text 2 . Text =” “
Text 3 . Text =” “
Text 4 . Text =” “
Text 5 . Text =” “
Text 6 . Text =” “
Text 7 . Text =” “
Text 8 . Text =” “
End sub
End
End sub
OUTPUT :
RESULT :
Thus the program has been executed successfully .
EX . NO : 11
DATE:
RICHTEXT BOX
AIM :
ALGORITHM:
cdb.ShowColor
rtb.BackColor = cdb.Color
End Sub
End
End Sub
Private Sub
cmdfont_Click() cdb.Flags
= h3orH100 cdb.ShowFont
rtb.SelBold = cdb.FontBold
rtb.SelColor = cdb.Color
rtb.SelUnderline = cdb.FontUnderline
rtb.SelFontName = cdb.FontName
rtb.SelFontSize = cdb.FontSize
End Sub
cdb.ShowOpen
rtb.OLEObjects.Add , , cdb.FileName
End SuB
rtb.LoadFile cdb.FileName
End Sub
OUT PUT:
RESULT :
To create a program for rich text box form using visual basic .
ALGORITHM :
STEP 2 : Place two command button and change caption as slide show and exit.
STEP 3 : Then , place one Image list , One slider , One Image box and Timer.
End If
End sub
End
End sub
() A=0
Timer 1. Enabled =
Timer 1 . Interval
=1900 End If
End sub
=a+1
Elase
A =0
End If
End sub
OUTPUT:
RESULT :
CHELAN
DATE :
AIM :
ALGORITHM:
STEP 6 : To save project click save project and the run whenever you want .
FORM DESIGN :
CODINGS :
Combo1.AddItem ("CREDIT
DEPOSIT") Combo1.AddItem
("SAVING DEPOSIT")
Combo1.AddItem ("CURRENT
DEPOSIT")
End Sub
OUTPUT :
RESULT:
Thus the program has been executed successfully .
EX. NO: 14
DATE :
AIM:
ALOGRITHM :
STEP 3: Then change the caption label box , text box and
command button .
form .
RESULT:
ALGORITHM:
STEP:3 Set the command button as add,update,delete and exit. The label
are rollno,name,m1,m2,m3,total,avg.
RESULT:
AIM:
To prepare a hospital management using visual basic(vb)
as affront-end and Ms access as a backend.
ALGORITHM:
End Sub
Private Sub Command8_Click()
End
End Sub
OUTPUT:
RESULT:
AIM:
To prepare a student marklist using visual basic(vb) as affront-end and Ms
access as a backend.
ALGORITHM:
STEP:1 Start the visual basic (vb) project using standard exe.
STEP:2 Open a new file and create the form using text text box, label box and
command button.
STEP:4 The labels are accno, ncus name, deposit, withdraw, balance, interest
and total.
DATE BASE:
SOURCE CODE:
RESULT:
Thus the program has been executed successfully.
EX.NO:18
ALGORITHM:
STEP:2 Open a new file and create the form using text
box,label
box and command button.