VB RECORD Programs Forprint
VB RECORD Programs Forprint
VB RECORD Programs Forprint
FORM DESIGN
SOURCE CODE
FORM DESIGN
SOURCE CODE
FORM DESIGN
SOURCE CODE
Dim password As String
OUTPUT
DISPLAY DATE USING DIALOG BOXES
FORM DESIGN
SOURCE CODE
Dim result As String
SOURCE CODE
Private Sub Command1_Click()
Dim str As String
str = Text6.Text
If str Like "[a-z a-z 0-9]*@[a-z A-z 0-9]*.[a-z A-z]*" Then
MsgBox "Email id is valid"
Else
MsgBox "Email id not valid"
End If
End Sub
SOURCE CODE
Private Sub Command1_Click()
Dim A, B As Integer
If Text1.Text = "" Then
MsgBox "bill no"
Text1.SetFocus
Exit Sub
End If
If Text2.Text = "" Then
MsgBox "name"
Text2.SetFocus
Exit Sub
End If
If Text3.Text = " " Then
MsgBox "enter the unit"
Text3.SetFocus
Exit Sub
End If
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Option1 = False
Option2 = False
End Sub
Private Sub Option1_Click()
A = Val(Text3.Text)
B = Val(Text4.Text)
If A = "" Then
Text5.Text = ""
ElseIf (A > 1) And (A <= 100) Then
= "free"
End If
End Sub
SOURCE CODE
Dim secret_number As Integer
FORM DESIGN
SOURCE CODE
Dim encryptval As String
Dim decryptval As String
Dim i As Integer
Dim mychar As String
SOURCE CODE
Sub swap(x As Integer, y As Integer)
Dim t As Integer
t = x
x = y
y = t
Print "value of a inside subroutine =" & x
Print "value of b inside subroutine =" & y
End Sub
OUTPUT
SORTING AND SEARCHING IN LISTBOX USING ARRAYS
FORM DESIGN
SOURCE CODE
Dim arr(100), flag, n, s As String
OUTPUT
SIMPLE CALCULATOR USING CONTROL ARRAY
FORM DESIGN
SOURCE CODE
Dim a, op, m
SOURCE CODE
Next
End Sub
MS1.Row = 0
MS1.Col = 0
MS1.Text = "Doctor no"
MS1.Col = 1
MS1.Text = "Doctor name"
MS1.Col = 2
MS1.Text = "Doctor address"
MS1.Col = 3
MS1.Text = "Phone no"
End Sub
OUTPUT
MENU WITH RICHTEXT BOX USING COMMON DIALOG
CONTROL
FORM DESIGN
SOURCE CODE
Private Sub editcopy_Click()
a = RTBOX.SelText
End Sub
FORM1
SOURCE CODE
MDI Form Source Code:
Dim i
Dim myform As New Form1
FORM DESIGN
SOURCE CODE
OUTPUT
ANIMATED DICE USING GRAPHICS
FORM DESIGN
SOURCE CODE
Dim x As Integer
Sub roll()
x = x + 10
Randomize Timer
n = Int(1 + Rnd * 6)
For i = 0 To 6
Shape2(i).Visible = False
Next
If n = 1 Then
Shape2(3).Visible = True
End If
If n = 2 Then
Shape2(2).Visible = True
Shape2(4).Visible = True
End If
If n = 3 Then
Shape2(2).Visible = True
Shape2(3).Visible = True
Shape2(4).Visible = True
End If
If n = 4 Then
Shape2(0).Visible = True
Shape2(2).Visible = True
Shape2(4).Visible = True
Shape2(6).Visible = True
End If
If n = 5 Then
Shape2(0).Visible = True
Shape2(2).Visible = True
Shape2(3).Visible = True
Shape2(4).Visible = True
Shape2(6).Visible = True
End If
If n = 6 Then
Shape2(0).Visible = True
Shape2(1).Visible = True
Shape2(2).Visible = True
Shape2(3).Visible = True
Shape2(4).Visible = True
Shape2(5).Visible = True
Shape2(6).Visible = True
End If
End Sub
Private Sub Command1_Click()
Timer1.Enabled = True
x = 0
End Sub
Private Sub Timer1_Timer()
If x < 1000 Then
roll
Else
Timer1.Enabled = False
End If
End Sub
OUTPUT
FREE STYLE DRAWING USING MOUSE EVENTS
FORM DESIGN
SOURCE CODE
OUTPUT
GENERATING EXCEL CHART USING OLE
FORM DESIGN
SOURCE CODE
OUTPUT
READ AND WRITE DATA USING SEQUENTIAL FILES
FORM DESIGN
SOURCE CODE
Dim filenum As Integer
Private Sub Command1_Click()
Text1.Text = " "
Text1.SetFocus
End Sub
OUTPUT
PAYROLL PROCESSING USING DAO
FORM DESIGN
SOURCE CODE
OUTPUT
TELEPHONE DIRECTORY MAINTENANCE USING ADODB
FORM DESIGN
Form1
Form2
SOURCE CODE
Form1 Source Code: