KEMBAR78
Visual Basic Project Work | PDF | Databases | Computer Programming
0% found this document useful (0 votes)
28 views58 pages

Visual Basic Project Work

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views58 pages

Visual Basic Project Work

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

Shivender Singh

1221783011103
INDEX
Page No Remark /
SN.o Projects Signature

1 Define Visual Programming Language, how it is different from


other Traditional Programming Language
2 Introduction of User Interface / Platform provided by VB60
with its different Components and Features

Define Text Box, Command Button, Option Button, Check


3 Box, List Box and Combo Box with their important properties,
events and methods

4 Write down different types of Database Connectivity’s and five


methods of Record set

5 Design a Calculator dialog window

6 Design a Font dialog window

7 Design a Color Palette dialog window

8 Design a Login Form dialog window

9 Design a Registration Form dialog window

10 Design a Table Create Using Looping) dialog window

11 Design a Traffic Light dialog window

12 Design a Marquee Text dialog window

13 Design a Custom Color Using Scrollbar) dialog window

14 Design a Stop Watch dialog window

15 Design a dialog window to Open Picture in picture-box

16 Design a dialog window to Student Information System


1. Visual Programming Language, how it is different from other
Traditional programming Language
Visual programming is a technique used in software development that allows
programmers to create software using visuals and graphics rather than code. It is a form
of coding that uses flowchart diagrams and blocks of code to create software
applications.

Visual programming is based on the idea that humans process information better when it
is presented visually. By using visual elements like icons, diagrams, and flowcharts,
visual programming makes it easier for programmers to understand and manipulate
code. Visual programming languages are designed to be intuitive and user-friendly,
making them accessible to people with little or no programming experience.

Visual programming languages (VPLs) differ from traditional programming


languages in several ways, including:

 Visual representation

VPLs use graphical elements like icons, flowcharts, and diagrams to create
programs, while traditional programming languages use lines of code.

 Accessibility

VPLs are more accessible to beginners and non-programmers because they don't
require writing code from scratch.

 Ease of use

VPLs are designed to be more user-friendly than traditional programming


languages, with simpler syntax and fewer errors.

 Speed

VPLs can help programmers create complex programs more quickly and efficiently
by using pre-existing code blocks.

 Debugging

VPLs make it easier to debug code because errors are often more visible in the
visual representation of the program.

Key Differences Between Visual Programming Language and Traditional


Programming Language
Visual Programming Language
Aspect (VPL) Traditional Programming Language

Programming Graphical elements (blocks,


Style flowcharts, nodes) Text-based code (lines of syntax)

Drag-and-drop, point-and-click Text editors, IDEs with syntax


User Interface interaction highlighting

Learning Often higher due to syntax and code


Curve Lower, especially for beginners structure

Can be harder to visualize, requires code-


Readability Often more intuitive, visual flow reading skills

Limited; suited for specific tasks or More flexible, suitable for general-purpose
Flexibility domains applications

Often requires familiarity with debugging


Debugging Visual feedback on errors or flow issues tools

Game design, educational tools, IoT General-purpose software, complex


Use Cases applications, prototyping applications, web development

Examples Scratch, Blockly, LabVIEW, Simulink Python, Java, C++, JavaScript

Pro and cons of visual programming :-

PROS:

 Easier Learning Curve: VPLs are accessible to beginners as they don’t require
memorizing complex syntax.
 Rapid Prototyping: Visual programs are often quicker to prototype since users
can visualize the entire process.
 Fewer Syntax Errors: Since users work with predefined blocks or visual
elements, syntax errors are minimized.

CONS:

 Limited Flexibility: VPLs may not offer the same versatility as traditional
languages, especially for large-scale or specialized applications.
 Scalability Issues: VPLs can become cluttered or difficult to manage for
very complex programs.
 Performance Limitations: VPLs are often optimized for simplicity and may
lack the performance optimizations found in traditional languages.
2. Introduction of user interface / platform provided by VB6.0 with its
Different components and features

Visual Basic 60 VB6) is an event-driven programming language VB6 provides an


intuitive graphical interface that simplifies the process of application development

UI or different Components of Visual Basic 60

Menu Bar: The menu bar contains standard menu options like File, Edit, View,
Project, Tools, Run, Add-Ins, and Help Each menu provides access to different
features of the VB6

Toolbox: The toolbox holds a collection of controls and components that can be
dragged and dropped onto forms. These controls include elements like text boxes,
buttons, labels, checkboxes, combo boxes, and more.

Project Explorer: The Project Explorer displays all the forms, modules, classes, and
other objects within a project. It gives an organized view of the project structure.

Properties Window: The Properties Window allows the developer to modify the
properties of any selected control or object. This is where you can change the
appearance, behavior and other settings of a control, such as setting the text, font, or
alignment of a label.

Form Designer: The Form Designer is where you visually design the user interface of
your application by placing controls from the toolbox onto the form each form represents
a window in your application, and you can customize its look and feel by arranging controls
in this space

Form Layout Window: The Form Layout Window allows you to position forms in
relation to the screen It shows a visual representation of where the form will appear on
the screen when the application runs, helping you to position it accurately
Object Browser: The Object Browser provides a list of all available objects including their
properties, methods, and events) within the project and external libraries

Different Features of Visual Basic 60

Drag-and-Drop UI Design: Visual Basic 60 makes user interface design easy with its
drag- and-drop functionality Developers can simply drag controls from the toolbox and
drop them onto a form, streamlining the UI development process

Event-Driven Programming: VB6 is built on an event-driven programming model,


meaning that the flow of the program is determined by events like button clicks, mouse
movements, or other user actions.

Database Connectivity: VB6 has built-in support for database programming It can
connect to a wide range of databases such as Microsoft Access, SQL Server, and Oracle
through technologies like Data Access Objects DAO), Remote Data Objects RDO), and
ActiveX Data Objects ADO)

Built-in Debugger: The VB6 IDE comes with a built-in debugger that lets developers
pause the execution of *code*, set breakpoints, and step through the *code* line by line to
locate andfix bugs

Support for DLLs and External Libraries: Developers can create and use Dynamic
Link Libraries DLLs) in their VB6 applications

The Visual Basic IDE is made up of a number of components


 Menu Bar
 Tool Bar
 Project Explorer
 Properties Window
 Form Layout Window
 Toolbox
 Form Designer
 Object Browser

Menu Bar: It contains a standard command like: File, Edit, View, Window, Help menus,
and specific command such as: Project, Format, or Debug menus.

Project Explorer Window: The window titled Project-Project1 is called the Project
Explorer and contains the project files. The project explorer window’s tool bar contains
three buttons, namely view code, view object and toggle folders. When pressed, the view
code button displays a window for writing Visual Basic code. View object, when pressed,
displays the form. Double-clicking form1 (form1) also displays the form. The toggle folders
button toggles (i.e., alternately hides or shows) the forms folder. The forms folder contains
a listing of all forms in the current project. To show the Project Explorer window press
View> Project Explorer window icon.

Toolbar: It contains the most commonly used commands (button), if clicked an action
represented by that button is carried out.
Project Explorer Window: The window titled Project-Project1 is called the Project
Explorer and contains the project files. The project explorer window’s tool bar contains
three buttons, namely view code, view object and toggle folders. When pressed, the view
code button displays a window for writing Visual Basic code. View object, when pressed,
displays the form. Double-clicking form1 (form1) also displays the form. The toggle folders
button toggles (i.e., alternately hides or shows) the forms folder. The forms folder contains
a listing of all forms in the current project. To show the Project Explorer window press
View> Project Explorer window icon.

Properties Window: The properties window displays the properties for a form or
control. Properties are attributes such as size, position, etc. like a form; each control
type has its own set of properties. Some properties, like width and height, such as, are
common to both forms and controls, while other properties are unique to form or control.
Controls often differ in the number and type of properties. Properties are listed either
alphabetically (by selecting the alphabetic tab) or categorically (by selecting the
categorized tab). The most important properties of the objects in general are listed in
the following table. To show the properties window press View> properties window icon.
Properties Objective
name
Name Used to represent name
of object in code.
Caption Name appears on
object.
Back color Background color for
object.
Fore color Color of text written on
object.
Font Font style type and size

Visible The tool is visible or


invisible.
Enable The tool enable or
disable
Height Length of object

Width Width of object

Top Coordinates of top of


object on screen
Left Coordinates of left of
object on screen
Text Allows inputting and
editing text in object.

ToolBox: Contains a collection of tools that are needed for project design as shown in
figure below. To show the toolbox press View> toolbox icon. The user can place the tool
on form, and then work with the tool. To place the tool on form: click on tool>draw tool
to form > the tool appears on form or double click on tool then the tool appears on form.
Table summarizes the toolbox controls.
Control Description

Pointer Used to interact with controls on the form (resize them, move them, etc.). the
pointer is not a control

PictureBox A control that displays images or print the result.

Label A control that displays un editable text to the user.

TextBox A control for accepting user input. Textbox can also display text.

Frame A control for grouping other controls.

CommandB A control that represents a button. The user presses or clicks to initiate an action.
utton
CheckBox A control that provides the user with a toggle choice (checked or unchecked)

OptionButto Option buttons are used in groups where only one at a time can be true.
n
ListBox A control that provides a list of items.

ComboBox A control that provides a short list of items.

HscrollBar A horizontal scrollbar.

VscrollBar A vertical scrollbar.

Timer A control that performs a task at programmer specified intervals. A timer is not
visible to the user.

DrivelistBox A control accessing the system disk drivers.

DirlistBox A control accessing directories on a system

Filelistbox A control accessing file in a directory

Shape A control for drawing circles, rectangles, squares or ellipse

Line A control for drawing line.

Image A control for displaying images. The images control does not provide as many
capabilities as a picture box.
OLE A control for interacting with other window applications.
3. Define TextBox, CommandButton, OptionButton, CheckBox, ListBox
and ComboBox with their important properties, events and methods.

The following Figure summarizes the common TextBox control's properties


and methods.

Property/
Method Description

Properties
Enabled Specifies whether user can interact with this control or not

Index Specifies the control array index

If this control is set to True user can use it else if this control is set to
false the control cannot be used
Locked

Specifies the maximum number of characters to be input. Default


value is set to 0 that means user can input any number of characters
MaxLength

MousePointer Using this we can set the shape of the mouse pointer when over a
TextBox

By setting this property to True user can have more than one line
in the TextBox
Multiline

PasswordChar This is to specify mask character to be displayed in the TextBox

This to set either the vertical scrollbars or horizontal scrollbars to


make appear in the TextBox. User can also set it to both vertical and
ScrollBars horizontal. This property is used with the Multiline property.

Text Specifies the text to be displayed in the TextBox at runtime

ToolTipIndex This is used to display what text is displayed or in the control

By setting this user can make the Textbox control visible or


invisible at runtime
Visible
Method
SetFocus Transfers focus to the TextBox

Event procedures
Change Action happens when the TextBox changes

Click Action happens when the TextBox is clicked

GotFocus Action happens when the TextBox receives the active focus

LostFocus Action happens when the TextBox loses it focus

KeyDown Called when a key is pressed while the TextBox has the focus

KeyUp Called when a key is released while the TextBox has the focus

Example:

In this application, two text boxes are inserted into the form together with a few labels.
The two text boxes are used to accept inputs from the user and one of the labels will be
used to display the sum of two numbers that are entered into the two text boxes.
Besides, a command button is also programmed to calculate the sum of the two numbers
using the plus operator. The program use creates a variable sum to accept the
summation of values from text box 1 and text box 2. The procedure to calculate and to
display the output on the label is shown below.

Private Sub Command1_Click()


'To add the values in TextBox1 and TextBox2 Sum = Val(Text1.Text)
+Val(Text2.Text) 'To display the answer on label 1 Label1.Caption = Sum
End Sub

The output is shown in Figure


COMMAND BUTTON

The command button is one of the most important controls as it is used to execute
commands. It displays an illusion that the button is pressed when the user clicks on it.
The most common event associated with the command button is the Click event, and
the syntax for the procedure is

Private Sub Command1_Click ()


Statements
End Sub

The Caption property determines the text to display on the face of the button. The
Default property, if set to true, means that the button will be activated (same as Clicked)
if the <Enter> key is hit anywhere in the form. If Cancel is set to True, the button will be
activated from anywhere in the form by the <Esc> key.
Properties Methods Events
Appearance, BackColor, Drag, Move, Click,
Cancel, Caption, Refresh, DragDrop,
Container, Default, SetFocus, DragOver,
DragIcon, DragMode, ShowWhatsThis, GotFocus,
Enabled, Font, ZOrder KeyDown,
FontBold, FontItalic, KeyPress,
FontName, FontSize, KeyUp,
FontStrikethru, LostFocus,
FontUnderline, Height, MouseDown,
HelpContextID, Index, MouseMove,
Left, MouseIcon,
MousePointer, Name,
Parent, Style, TabIndex,
TabStop, Tag, Top,
Value, Visible,
WhatsThisHelpID,
Width

Example:

We want to crack a secret password entered by the user. In the design phase, insert a
command button. Next, insert a TextBox and delete Text1 from the Text property.
Besides that, set its PasswordChr to *. Now, enter the following code in the code
window.

Private Sub Command1_Click() Dim yourpassword As String


yourpassword = Text1.Text
MsgBox ("Your password is: " & yourpassword)
End Sub

Run the program and enter a password, then click on the Show Password button to
reveal the password, as shown in Figure
THE CHECKBOX
The Check Box control lets the user selects or unselects an option. When the Check Box
is checked, its value is set to 1 and when it is unchecked, the value is set to 0. You can
include the statements Check1.Value=1 to mark the Check Box and Check1.Value=0 to
unmark the Check Box, as well as use them to initiate certain actions. In checkbox user
can select more than one option. Multiple selections are allowed in checkbox.
Properties Methods Events
Alignment, Appearance, BackColor, Caption, Drag, Move, Click, DragDrop,
Container, DataChanged, DataField, Refresh, DragOver, GotFocus,
DataSource, DragIcon, DragMode, Enabled, SetFocus, KeyDown, KeyPress,
Font, FontBold, FontItalic, FontName, ShowWhatsThis, KeyUp, LostFocus,
FontSize, FontStrikethru, FontUnderline, ZOrder MouseDown,
ForeColor, Height, HelpContextID, hWnd, MouseMove,
Index, Left, MousePointer, Name, Parent, MouseUp
TabIndex, TabStop, Tag, Top, Value, Visible,
WhatsThisHelpID, Width

Example:
In this application will show which items are selected in a message box.

Private Sub Command1_Click()


If Check1.Value = 1 And Check2.Value = 0 And Check3.Value = 0 Then
MsgBox "Apple is selected"
ElseIf Check2.Value = 1 And Check1.Value = 0 And Check3.Value = 0 Then
MsgBox "Orange is selected"
ElseIf Check3.Value = 1 And Check1.Value = 0 And Check2.Value = 0 Then
MsgBox "Orange is selected"
ElseIf Check2.Value = 1 And Check1.Value = 1 And Check3.Value = 0 Then
MsgBox "Apple and Orange are selected"
ElseIf Check3.Value = 1 And Check1.Value = 1 And Check2.Value = 0 Then
MsgBox "Apple and Pear are selected"
ElseIf Check2.Value = 1 And Check3.Value = 1 And Check1.Value = 0 Then
MsgBox "Orange and Pear are selected"
Else
MsgBox”all area selected”
Endif
End Sub

Output :-

OPTION BUTTON

OptionButton controls are also known as radio buttons because of their shape. You always
use OptionButton controls in a group of two or more because their purpose is to offer a number
of mutually exclusive choices. Anytime you click on a button in the group, it switches to a
selected state and all the other controls in the group become unselected. Its value is set to
“True” and when it is unselected; its value is set to “False”.

A group of OptionButton controls is often hosted in a Frame control. This is


necessary when there are other groups of OptionButton controls on the form. As far as
Visual Basic is concerned, all the OptionButton controls on a form's surface belong to the
same group of mutually exclusive selections, even if the controls are placed at the opposite
corners of the window. The only way to tell Visual Basic which controls belong to which
group is by gathering them inside a Frame control. Actually, you can group your controls
within any control that can work as a container—PictureBox, for example—but Frame
controls are often the most reasonable choice.

Properties Methods Events


Alignment, Appearance, BackColor, Caption, Drag, Move, Click, DblClick,
Container, DragIcon, DragMode, Enabled, Refresh, DragDrop, DragOver,
Font, FontBold, FontItalic, FontName, FontSize, SetFocus, GotFocus, KeyDown,
FontStrikethru, FontUnderline, ForeColor, ShowWhatsThis, KeyPress, KeyUp,
Height, HelpContextID, hWnd, Index, Left, Zorder LostFocus,
MouseIcon, MousePointer, Name, Parent, MouseDown,
TabIndex, TabStop, Tag, Top, Value, Visible, MouseMove, MouseUp
WhatsThisHelpID, Width
COMBOBOX:-
A combobox control is combination of textbox and listbox. This control enables user to select
either by typing in the text into combobox or by selecting items from the list. The function of
the Combo Box is also to present a list of items where the user can click and select the items
from the list. However, the user needs to click on the small arrowhead on the right of the
combo box to see the items which are presented in a drop-down list. In order to add items to
the list, you can also use the AddItem method. Combobox is collapsed and it does not
displays all the items.
The combobox controls has three different style that can be set.
a. Drop down combo (style 0)
b. Simple combo (style 1)
c. Drop down list (style 2)

Drop down combo


The Dropdown Combo box first appears as only an edit area with a down arrow button at the
right. The list portion stays hidden until the user clicks the down-arrow button to drop down the
list portion. The user can either select a value from the list or type a value in the edit area.

Simple combo
The Simple Combo box displays an edit area with an attached list box always visible
immediately below the edit area. A simple combo box displays the contents of its list all the
time. The user can select an item from the list or type an item in the edit box portion of the
combo box. A scroll bar is displayed beside the list if there are too many items to be displayed
in the list box area.

Drop down list


The Dropdown list combo box turns the combo box into a Dropdown list box. At run time, the
control looks like the Dropdown combo box. The user could click the down arrow to view the
list. The difference between Dropdown combo & Dropdown list combo is that the edit area in
the Dropdown list combo is disabled. The user can only select an item and cannot type
anything in the edit area. Anyway, this area displays the selected item.
Property/Method Description

Properties
By setting this property to True or False user can decide whether usercan
Enabled interact with this control or not

Index Specifies the Control array index


String array. Contains the strings displayed in the drop-down list.
List Starting array index is 0.

ListCount Integer. Contains the number of drop-down list items


Integer.Contains theindex of the selected ComboBox item. If an itemis not
ListIndex selected, ListIndex is -1

Locked Boolean. Specifies whether user can type or not in the ComboBox
Integer. Specifies the shape of the mouse pointer when over the area of
MousePointer the ComboBox

Integer. Index of the last item added to the ComboBox. If the


NewIndex ComboBox does not contain any items, NewIndex is -1

Sorted Boolean. Specifies whether the ComboBox's items are sorted or not.

Style Integer. Specifies the style of the ComboBox's appearance

TabStop Boolean. Specifies whether ComboBox receives the focus or not.

Text String. Specifies the selected item in the ComboBox

ToolTipIndex String. Specifies what text is displayed as the ComboBox's tool tip

Visible Boolean. Specifies whether ComboBox is visible or not at run time

Methods

AddItem Add an item to the ComboBox

Clear Removes all items from the ComboBox

RemoveItem Removes the specified item from the ComboBox

SetFocus Transfers focus to the ComboBox

Event Procedures

Change Called when text in ComboBox is changed

DropDown Called when the ComboBox drop-down list is displayed

GotFocus Called when ComboBox receives the focus

LostFocus Called when ComboBox loses it focus


LISTBOX:-
ListBox present a list of choices that are displayed vertically in single column, if number of
items exist the value can be displayed scrollbar automatically appear on control. Listbox is
expanded and displays all the items.

ListBox have list property contain list or item to display. To add the item at design time,
click on list property & add item, press ctrl + enter after adding each item. To add item at
runtime to AddItem method is used.

Property/Method Description

Properties

Enabled By setting this property to True or False user can decide whether usercan
interact with this control or not

Index Specifies the Control array index

List String array. Contains the strings displayed in the drop-down list.
Starting array index is 0.

ListCount Integer. Contains the number of drop-down list items

ListIndex Integer Contains the index of the selected ListBox items. If an item isnot
selected, ListIndex is -1

Locked Boolean. Specifies whether user can type or not in the ListBox

MousePointer Integer.Specifies the shape of the mouse pointer when over the area of
the ListBox

NewIndex Integer. Index of the last item added to the ListBox. If the ListBoxdoes
not contain any items, NewIndex is -1

Sorted Boolean. Specifies whether the ListBox's items are sorted or not.

Style Integer.Specifies the style of the ListBox's appearance

TabStop Boolean. Specifies whether ListBox receives the focus or not.

Text String. Specifies the selected item in the ListBox

ToolTipIndex String. Specifies what text is displayed as the ListBox's tool tip

Visible Boolean. Specifies whether ListBox is visible or not at run time

Methods

AddItem Add an item to the ListBox

Clear Removes all items from the ListBox

RemoveItem Removes the specified item from the ListBox

SetFocus Transfers focus to the ListBox


Event Procedures

Change Called when text in ListBox is changed

DropDown Called when the ListBox drop-down list is displayed

GotFocus Called when ListBox receives the focus

LostFocus Called when ListBox loses it focus

4. Write down different types of Database Connectivity’s and five methods of


Recordset.
Database connectivity is the process of allowing applications to communicate with database
management systems DBMS. It's a bridge between applications and databases that enables
applications to access data stored in a database.

Different Types of Database Connectivities

1. ODBC (Open Database Connectivity)


A standard API for accessing database management systems DBMS) It allows
applications to communicate with different types of databases using the same
*code*

2. JDBC (Java Database Connectivity)


Java-based API that allows Java applications to interact with databases JDBC
drivers are required for connecting to different databases

3. ADONET (ActiveX Data Objects for NET)


A data access technology in the NET Framework It is used to connect to
databases, retrieve, manipulate, and update data

4. OLE DB (Object Linking and Embedding, Database)


A set of COM-based interfaces that allow access to data in a variety of formats
and is used primarily in the Windows environment

5. NoSQL Database Connectivity


Direct connections to NoSQL databases like MongoDB, Couchbase, etc, using
their specific drivers and libraries eg, PyMongo for MongoDB)

6. Entity Framework EF
An ORM Object Relational Mapping) framework for NET, which allows
developers to work with databases using NET objects

7. RESTful APIs for Databases


Some modern databases provide RESTful API support to interact with databases
over HTTP

8. PHP (Database Connectivity PDO and MySQL)


PHP provides PDO PHP Data Objects) and MySQLi extensions for connecting to
databases such as MySQL
9. Hibernate for Java
An ORM framework for Java, which abstracts the communication with a
relationa database and converts the database records into Java objects

Five Common Methods of a Record Set

1. AddNew)

This method is used to add a new, empty record to the RecordSet You can
then populate the fields and save the changes

Example:-
rsAddNew rs"FieldName") = "Value"
rsUpdate

2. Update)

After modifying the fields of the current record, the Update method saves the
changes to the database

Example:-
rs"FieldName") = "NewValue" rsUpdate

3. Delete)

Deletes the current record from the RecordSet

Example:-
rsDelete

4. MoveNext)

Moves to the next record in the RecordSet

Example:-
rsMoveNext

5. Close)

Closes the RecordSet to release resources

Example:-
rsClose
5. Write down different types of Database Connectivity’s and five methods of
Recordset.
CODING:-
Dim Fvalue, Svalue As Integer Dim op As String

Private Sub cmd00_Click()


txtInputBox.Text = txtInputBox.Text + "00"
End Sub

Private Sub cmd1_Click()


txtInputBox.Text = txtInputBox.Text + "1"
End Sub

Private Sub cmd2_Click()


txtInputBox.Text = txtInputBox.Text + "2"
End Sub

Private Sub cmd3_Click()


txtInputBox.Text = txtInputBox.Text + "3"
End Sub

Private Sub cmd4_Click()


txtInputBox.Text = txtInputBox.Text + "4"
End Sub

Private Sub cmd5_Click()


txtInputBox.Text = txtInputBox.Text + "5"
End Sub

Private Sub cmd6_Click()


txtInputBox.Text = txtInputBox.Text + "6"
End Sub

Private Sub cmd7_Click()


txtInputBox.Text = txtInputBox.Text + "7"
End Sub

Private Sub cmd8_Click()


txtInputBox.Text = txtInputBox.Text + "8"
End Sub

Private Sub cmd9_Click()


txtInputBox.Text = txtInputBox.Text + "9"
End Sub

Private Sub cmd0_Click()


txtInputBox.Text = txtInputBox.Text + "0"
End Sub
Private Sub cmdDot_Click()
txtInputBox.Text = txtInputBox.Text + "."
End Sub

Private Sub
cmdClear_Click()
txtInputBox.Text =
"0"
End Sub

Private Sub
cmdDiv_Click()
op = "/"
InputData
End Sub

Private Sub
cmdModulo_Click()
op = "Mod"
InputData
End Sub

Private Sub
cmdMul_Click()
op = "*"
InputData
End Sub

Private Sub
cmdSub_Click()
op = "-"
InputData
End Sub

Private Sub
cmdSum_Click()
op = "+"
InputData
End Sub

Private Sub cmdEqual_Click()


Svalue =
Val(txtInputBox.Text)
If op = "Mod" Then
txtInputBox.Text = Fvalue Mod Svalue
ElseIf op = "+" Then
txtInputBox.Text = Fvalue + Svalue
ElseIf op = "-" Then
txtInputBox.Text = Fvalue - Svalue
ElseIf op = "*" Then
txtInputBox.Text = Fvalue * Svalue

ElseIf op = "/" Then


If Svalue = 0 Then
MsgBox "We cannot divisible by 0."
Else
txtinputbox.text=Fvalue/Svalue
Endif
Endif
Endsub

Private Sub cmdDelete_Click()


If txtInputBox.Text = "" Then
MsgBox "TextBox Is Empty
Else
End If
txtInputBox.Text = Left(txtInputBox.Text, Len(txtInputBox.Text) - 1)

End Sub

USER DEFINE PROCEDURE

Public Sub InputData()


If (txtInputBox.Text <> "") Then
Fvalue = Val(txtInputBox.Text)
txtInputBox.Text = ""
txtInputBox.SetFocus
End If
End Sub
6. Design a Font dialog window
CODING:-
Private Sub chkStrikeout_Click()
If chkStrikeout.Value = 1 Then
lblPreview.FontStrikethru = True

Else
lblPreview.FontStrikethru = False
End If
End Sub
Private Sub chkUnderline_Click()
If chkUnderline.Value = 1 Then
lblPreview.FontUnderline = True

Else

End If End Sub


lblPreview.FontUnderline = False

Private Sub cmdCancel_Click() Unload Me


End Sub

Private Sub Form_Load() lstFont.ListIndex = 0


lstFontStyle.ListIndex = 0
lstSize.ListIndex = 3
End Sub

Private Sub
lstFont_Click() txtFont.Text = lstFont.Text
End Sub

Private Sub lstFontStyle_Click() txtFontStyle.Text = lstFontStyle.Text


End Sub

Private Sub lstSize_Click() txtSize.Text = lstSize.Text


End Sub
Private Sub txtFont_Change()
If txtFont.Text <> "" Then
lblPreview.Font = txtFont.Text
End If
End Sub

Private Sub txtSize_Change()


lblPreview.FontSize = txtSize.Text
End Sub
Private Sub txtFontStyle_Change()
Select Case txtFontStyle.Text
Case "Regular"
lblPreview.FontBold = False
lblPreview.FontItalic = False
Case "Bold Oblique"
lblPreview.FontItalic = True
lblPreview.FontBold = True

End Select
If txtFontStyle.Text = "Bold" Then
lblPreview.FontBold = True
lblPreview.FontItalic = False
ElseIf txtFontStyle.Text = "Oblique"

Then lblPreview.FontItalic = True


lblPreview.FontBold = False
End If
End Sub

Private Sub VScroll1_Change()


txtSize.Text = VScroll1.Value
End Sub
7. Design a Color Palette dialog window:-
CODING:-
Private Sub cmdColor1_Click()
txtPreview.ForeColor = cmdColor1.BackColor
End Sub

Private Sub cmdColor2_Click()


txtPreview.ForeColor = cmdColor2.BackColor
End Sub

Private Sub cmdColor3_Click()


txtPreview.ForeColor = cmdColor3.BackColor
End Sub

Private Sub cmdColor4_Click()


txtPreview.ForeColor = cmdColor4.BackColor
End Sub

Private Sub cmdColor5_Click()


txtPreview.ForeColor = cmdColor5.BackColor
End Sub

Private Sub cmdColor6_Click()


txtPreview.ForeColor = cmdColor6.BackColor
End Sub

Private Sub cmdColor7_Click()


txtPreview.ForeColor = cmdColor7.BackColor
End Sub

Private Sub cmdColor8_Click()


txtPreview.ForeColor = cmdColor8.BackColor
End Sub

Private Sub cmdColor9_Click()


txtPreview.ForeColor = cmdColor9.BackColor
End Sub

Private Sub txtColor1_Click()


txtPreview.BackColor = txtColor1.BackColor
End Sub

Private Sub txtColor2_Click()


txtPreview.BackColor = txtColor2.BackColor
End Sub
Private Sub txtColor3_Click()
txtPreview.BackColor = txtColor3.BackColor
End Sub

Private Sub txtColor4_Click()


txtPreview.BackColor = txtColor4.BackColor
End Sub

Private Sub txtColor5_Click()


txtPreview.BackColor = txtColor5.BackColor
End Sub

Private Sub txtColor6_Click()


txtPreview.BackColor = txtColor6.BackColor
End Sub

Private Sub txtColor7_Click()


txtPreview.BackColor = txtColor7.BackColor
End Sub

Private Sub txtColor8_Click()


txtPreview.BackColor = txtColor8.BackColor
End Sub

Private Sub txtColor9_Click()


txtPreview.BackColor =txtColor9.BackColor
End Sub
8.Design a Login Form dialog window.
CODING:-
Private Sub chkShowPassword_Click()
If chkShowPassword.Value = 1 Then
txtPassword.PasswordChar = ""

Else
txtPassword.PasswordChar = "*"
End If
End Sub

Private Sub txtUserName_KeyPress(KeyAscii As Integer)


If Chr$(KeyAscii) >= "a" And Chr$(Ascii) <= "z" Then
KeyAscii = KeyAscii - 32
End If
If (KeyAscii) >= vbKeyA And (KeyAscii) <= vbKeyZ Then
MsgBox "Characters are Not Allowed.", vbCritical, "Validation" KeyAscii = "0"
End If
End Sub

Private Sub lblRegisterNow_Click() frmRegistrationForm.Show


End Sub

Private Sub lblLogin_Click()


Adodc1.RecordSource = "select * from Student_Master_Table where
Mobile_Number = '" + txtUserName.Text + "' and Password = '" + txtPassword.Text + "' "
Adodc1.Refresh

If txtUserName.Text = "Mobile No." Or Len(txtUserName.Text) <> 10 Then MsgBox


"Please Enter Correct Username", vbCritical, "Invalid Username"
txtUserName.SetFocus

ElseIf txtPassword.Text = "Password" Or txtPassword.Text = "" Then MsgBox "Please


Enter Password", vbExclamation, "Invalid Password" txtPassword.SetFocus

ElseIf Adodc1.Recordset.EOF Then


MsgBox "Login Failed, Try Again..!!!", vbCritical, "Please Enter correct Username and
Password"
RefreshCaptcha txtUserName.Text = ""
txtPassword.Text = ""

ElseIf txtCaptcha.Text = "Captcha" Or txtCaptcha.Text = "" Then


MsgBox "Please Enter Captcha", vbExclamation, "Invalid Captcha"
txtCaptcha.SetFocus

ElseIf txtCaptcha.Text <> lblCaptchaCode.Caption Then


MsgBox "Invalid Captcha", vbCritical, "Wrong Captcha" RefreshCaptcha

ElseIf txtCaptcha.Text = lblCaptchaCode.Caption Then


MsgBox "Login Sucessfully", vbInformation, "Sucessful Attempt"

End If
End Sub
Private Sub
lblRefresh_Click()
RefreshCaptcha
End Sub

Private Sub
Form_Load()
Call
RefreshCaptcha
End Sub

---------------------------User Define Procedure------------------------------


Public Sub RefreshCaptcha()
lblCaptchaCode.Caption = CInt((Rnd * 9999) + Rnd)

End Sub
9. Design a Registration Form dialog window

CODING:-

Private Sub cmdsubmit_Click)


MsgBox "SUBMITED SUCESSESFULLY", vbInforma on, ""
Data1RecordsetUpdate
End Sub

Private Sub Command1_Click)


Data1RecordsetAddNew
DTPicker1Value = Date
End Sub

Private Sub Command2_Click)


Data1RecordsetDelete
Data1Refresh
End Sub

Private Sub Command3_Click)


Data1RecordsetMoveNext
End Sub

Private Sub Command4_Click)


Data1RecordsetMovePrevious
End Sub

Private Sub Command5_Click)


Data1RecordsetMoveLast
End Sub
Private Sub Command6_Click)
Data1RecordsetMoveFirst
End Sub

Private Sub optnoo_Click) If


optnoo = True Then

txtAadhaarNumberrEnabled = False

End If
End Sub

Private Sub optyess_Click) If


optyess = True Then

txtAadhaarNumberrEnabled = True
End If
End Sub

*INPUT*
*OUTPUT*
10. Design a Table Create Using Looping) dialog window.

CODING:-
Dim i As Integer

Private Sub cmdaddtable_Click) For tablevalue = 1 To


10 Step 1
lsttableAddItem tablevalue Valtxttable*Input*Text))
Next txttable*Input*Text = ""
txttable*Input*SetFocus
End Sub

Private Sub cmdaddtable2_Click)


lsttable = "" i = 0
Do While i < 10
i=i+1
lsttableAddItem i Valtxttable*Input*Text))
Loop
End Sub
Private Sub cmdaddtable3_Click) lsttable = "" i=0
Do Until i > 9 i=i+1
lsttableAddItem i Valtxttable*Input*Text))
Loop
End Sub

*INPUT*

*OUTPUT*
11. Design a Traffic Light dialog window.

CODING:-
Private Sub Timer1_Timer()
Static change As Integer
change = change + 1
If change = 1 Then
RedFillColor = &HFF&
YellowFillColor = &H80000003
GreenFillColor = &H80000003
lblStatusCaption = "Stop"
lblStatusForeColor = &HFF&
lblStopVisible = True
lblreadyVisible = False
lblgoVisible = False
ElseIf change = 2 Then
RedFillColor = &H80000003
YellowFillColor = &HFFFF&
GreenFillColor = &H80000003
lblStatusCaption = "Ready"
lblStatusForeColor = &HFFFF&
lblStopVisible = False
lblreadyVisible = True
lblgoVisible = False
ElseIf change = 3 Then
RedFillColor = &H80000003
YellowFillColor = &H80000003
GreenFillColor = &HFF00&
lblStatusCaption = "Go"
lblStatusForeColor = &HFF00&
lblStopVisible = False
lblreadyVisible = False
lblgoVisible = True change = 0
End If
End Sub

*OUTPUT*
12.Design a Marquee Text dialog window.

CODING:-
Dim Click As String

Private Sub cmdStop_Click()


If cmdStop.Caption = "Stop" Then
Timer1.Enabled = False
cmdStop.Caption = "Start"
Else: cmdStop.Caption = "Start"
Timer1.Enabled = True
cmdStop.Caption = "Stop"
End If
End Sub

Private Sub cmdTopRight_Click()


Click = "TopRight"
End Sub

Private Sub cmdHorizontal_Click()


Click = "Horizontal"
End Sub

Private Sub cmdTopLeft_Click()


Click = "TopLeft"
End Sub

Private Sub cmdVertically_Click()


Click = "Vertical"
End Sub
Private Sub Timer1_Timer()
Static Direction As Integer
If Click = "Horizontal" Then
If (Direction = 0) Then
lblStatus.Caption = "Move Left To Right"
Label1.Left = Label1.Left + 1000
If Label1.Left > Me.ScaleWidth - Label1.Width Then
Direction = 1
End If
Else:
lblStatus.Caption = "Move Right To Left"
Label1.Left = Label1.Left - 1000
If Label1.Left <= 0 Then
Direction = 0
End If
End If
ElseIf Click = "Vertical" Then
If (Direction = 0) Then
lblStatus.Caption = "Move Top To Bottom"
Label1.Top = Label1.Top + 1000

If Label1.Top > Me.ScaleHeight - Label1.Height Then


Direction = 1
End If

Else:
lblStatus.Caption = "Move Bottom To Top" Label1.Top = Label1.Top - 1000
If Label1.Top <= 0 Then
Direction = 0
End If
End If

ElseIf Click = "TopRight" Then


lblStatus.Caption = ""
If (Direction = 0) Then
Label1.Left = Label1.Left - 2000
Label1.Top = Label1.Top + 1000
If Label1.Left <= 0 Or Label1.Top > Me.ScaleHeight - Label1.Height Then
Direction = 1
End If

Else:
Label1.Left = Label1.Left + 2000 Label1.Top = Label1.Top - 1000
If Label1.Left > Me.ScaleWidth - Label1.Width Or Label1.Top <= 0 Then
Direction = 0
End If
End If

ElseIf Click = "TopLeft" Then


lblStatus.Caption = ""
If (Direction = 0) Then
Label1.Left = Label1.Left + 2000
Label1.Top = Label1.Top + 1000
If Label1.Left > Me.ScaleWidth - Label1.Width Or Label1.Top >
Me.ScaleHeight - Label1.Height Then
Direction = 1
End If
Else:
Label1.Left = Label1.Left – 2000
Label1.Top = Label1.Top - 1000
If Label1.Left <= 0 Or Label1.Top <= 0 Then
Direction = 0
End If
End If
End If
End Sub

*OUTPUT*
13. Design a costume Color Using scrollbar) dialog window.

CODING:-
Private Sub cmdPutBackcolor_Click()
txtColorPreview.BackColor = txtMakeColor.BackColor
End Sub

Private Sub cmdPutFontcolor_Click()


txtColorPreview.ForeColor = txtMakeColor.BackColor
End Sub

Private Sub HScrollRed_Change()


txtMakeColor.BackColor = RGB(Val(HScrollRed.Value), Val(HScrollGreen.Value),
Val(HScrollBlue.Value))
End Sub

Private Sub HScrollGreen_Change()


txtMakeColor.BackColor = RGB(Val(HScrollRed.Value), Val(HScrollGreen.Value),
Val(HScrollBlue.Value))
End Sub

Private Sub HScrollBlue_Change()


txtMakeColor.BackColor = RGB(Val(HScrollRed.Value), Val(HScrollGreen.Value),
Val(HScrollBlue.Value))
End Sub
*OUTPUT*
14. Design a Stop Watch dialog window.

CODING:-
Dim LapCount As Integer
Dim MiliSec As Integer
Dim Sec As Integer
Dim Min As Integer

Private Sub cmdclearhistory_Click)


LapHistoryClear
End Sub

Private Sub cmdPause_Click)


If cmdPauseCaption = "Pause" Then
cmdLapCaption = "Stop"
cmdPauseCaption = "Resume"
Timer1Enabled = False
ElseIf cmdPauseCaption = "Resume" Then
cmdLapCaption = "Lap"
cmdPauseCaption = "Pause"
Timer1Enabled = True
End If
End Sub

Private Sub cmdStart_Click)


cmdLapVisible = True
cmdPauseVisible = True
cmdStartVisible = False
Timer1Enabled = True
cmdLapCaption = "Lap"
cmdPauseCaption = "Pause"
End Sub
Private Sub cmdLap_Click)
If cmdLapCaption = "Lap" Then
LapCount = LapCount + 1
LapHistoryAddItem LapCount & " " & lblTimeCaption
ElseIf cmdLapCaption = "Stop" Then
lblTimeCaption = "00:0000"
MiliSec = 0
Sec = 0
Min = 0
Timer1Enabled = False
cmdLapVisible = False
cmdPauseVisible = False
cmdStartVisible = True
cmdStartSetFocus
End If
End Sub

Private Sub Timer1_Timer)


MiliSec = MiliSec + 1
If MiliSec = 60 Then
Sec = Sec + 1
MiliSec = 0
If Sec = 60 Then
Min = Min + 1
Sec = 0
End If
End If
lblTimeCaption = Format$Min, "00") & ":" & Format$Sec, "00") & "" & Format$MiliSec,
"00")
End Sub

*INPUT*
*OUTPUT*
15. Design a Dilog Window to Open Picture in Picture-box.

CODING:-
Dim strfullpath As String
Private Sub
dirselect_Change)
fleselectPath =
dirselectPath updatepath
End Sub

Private Sub drvselect_Change)


dirselectPath = drvselectDrive
updatepath
End Sub

Private Sub fleselect_Click) picdisplayPicture =


LoadPicturestrfullpath & "\" & fleselectFileName)

picdisplayScaleMode = 3
picdisplayAutoRedraw = True
picdisplayPaintPicture picdisplayPicture, 0, 0, picdisplayScaleWidth, picdisplayScaleHeight,
0, 0, picdisplayPictureWidth / 2646, picdisplayPictureHeight / 2646 picdisplayPicture =
picdisplayImage
End Sub

Private Sub Form_Load)


fleselectPattern =
"jpeg;jpg;bmp;png"
End Sub
Private Sub updatepath)
strfullpath = dirselectPath
txtcurrentpathText =
strfullpath
End Sub

*OUTPUT*
16. Design a dialog window to Student Information system.

Student Registration

CODING:-
Private Sub cmdsubmit_Click()
MsgBox "SUBMITED SUCESSESFULLY", vbInformation, ""
Data1.Recordset.Update
End Sub

Private Sub Command1_Click()


Data1.Recordset.AddNew
DTPicker1.Value = Date
End Sub

Private Sub Command2_Click()


Data1.Recordset.Delete
Data1.Refresh
End Sub

Private Sub Command3_Click()


Data1.Recordset.MoveNext
End Sub

Private Sub Command4_Click()


Data1.Recordset.MovePrevious
End Sub

Private Sub Command5_Click()


Data1.Recordset.MoveLast
End Sub

Private Sub Command6_Click()


Data1.Recordset.MoveFirst

End Sub

Private Sub Command7_Click()


coursemaster.Show
Unload Me

End Sub
Private Sub optnoo_Click() If
optnoo = True Then
txtAadhaarNumberr.Enabled =
False
End If
End Sub

Private Sub optyess_Click()


If optyess = True Then
txtAadhaarNumberr.Enabled =
True
End If
End Sub

Private Sub Form_Load()


Adodc1.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=E:\RohitDatabase.mdb;"
Adodc1.RecordSource = "Select * From Registration"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
End Sub

*OUTPUT*
Course Master

CODING:-
Private Sub add_Click()
Data1.Recordset.AddNew
cbocourse.Text = ""
duration.Caption = ""
code.Caption = ""
total.Caption = ""
fees.Caption = ""
End Sub

Private Sub cbocategory_Click()


cbocourse.Clear
If cbocategory.Text = "UG(Under Graduation)" Then
cbocourse.AddItem "BCA(Bechlor's In Computer Application)"
cbocourse.AddItem "BBA(Bachelor of Business Administration)"
cbocourse.AddItem "B.Com(Bachelor of Commerce)"
Else
cbocourse.Text = ""
duration.Caption = ""
code.Caption = ""
total.Caption = ""
fees.Caption = ""
End If
If cbocategory.Text = "PG(Post Graduation)" Then
cbocourse.AddItem "MCA(Master's In Copmuter Application)"
cbocourse.AddItem "MBA(Master of Business Administration)"
cbocourse.AddItem "M.Com(Master of Commerce)"
End If
End Sub

Private Sub cbocourse_Click()


If cbocourse.Text = "BCA(Bechlor's In Computer
Application)" Then duration.Caption = "3 Year"
total.Caption = "40000" fees.Caption = "10000"
code.Caption = "DAVBCA2024MDU"
ElseIf cbocourse.Text = "BBA(Bachelor of Business
Administration)" Then duration.Caption = "3 Year" total.Caption
= "30000" fees.Caption = "5000" code.Caption =
"DAVBBA2024MDU"
ElseIf cbocourse.Text = "B.Com(Bachelor of
Commerce)" Then duration.Caption = "2 Year"
total.Caption = "20000" fees.Caption = "5000"
code.Caption = "DAVBCOM2024MDU"
ElseIf cbocourse.Text = "MCA(Master's In Copmuter
Application)" Then duration.Caption = "2 Year" total.Caption
= "100000" fees.Caption = "25000" code.Caption =
"DAVMCA2024MDU"
ElseIf cbocourse.Text = "MBA(Master of Business
Administration)" Then duration.Caption = "2 Year"
total.Caption = "300000" fees.Caption = "75000"
code.Caption = "DAVMBA2024MDU"
ElseIf cbocourse.Text = "M.Com(Master of
Commerce)" Then duration.Caption = "2 Year"
total.Caption = "60000" fees.Caption = "15000"
code.Caption = "DAVMCOM2024MDU"
End If
End Sub
Private Sub cmdsave_Click()
MsgBox "your data has been stored"
Data1.Recordset.Update
End Sub
Private Sub Command7_Click()
'Subjectmaster.Show
Dim frm As New
subjectmaster
frm.coursename =
cbocourse.Text
frm.coursecode =
code.Caption frm.Show
'Dim aaa As New
Subjectmaster
frm.semester =
cbocourse.Text
'aaa.Show
End Sub
Private Sub del_Click()
Data1.Recordset.Delete
End Sub
Private Sub first_Click()
Data1.Recordset.MoveFirst
End Sub
Private SubForm_Load()
cbocategory.Text = "" cbocourse.Text
= ""
cbocourse.Text =
"" duration.Caption
= "" code.Caption
= "" total.Caption =
"" fees.Caption = ""
Adodc1.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=E:\CourseMaster.mdb;"
Adodc1.RecordSource = "Select * From course"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
End Sub
Private Sub last_Click()
Data1.Recordset.MoveLast
End Sub
Private Sub next_Click()
Data1.Recordset.MoveNext
End Sub
Private Sub previous_Click()
Data1.Recordset.MovePrevious
End Sub
Private Sub textcollege_Change()
UpdateCourseInfo
End Sub
Private Sub textyear_Change()
UpdateCourseInfo
End Sub
Private Sub textuni_change()
UpdateCourseInfo
End Sub
Private Sub UpdateCourseInfo()
If cbocourse.Text = "BCA" And textcollege.Text <> "" And textyear.Text <> ""
And textuni.Text <> "" Then
code.Caption = textcollege.Text & cbocourse.Text & textyear.Text &
textuni.Text End If
End Sub
*OUTPUT*
Subject Master

Public coursename As String

CODING:-
Public coursecode As String
Public semester As String
Private Sub add_Click()
Data1.Recordset.AddNew
End Sub
Private Sub
cbosubject_Click() If
cbosubject.Text = "Maths"
Then txtsubject.Text =
"BCA103" txtcategory.Text
= "Practical" txtmarks.Text
= "55"
ElseIf cbosubject.Text = "Visual
Basic" Then txtsubject.Text =
"BCA304" txtcategory.Text =
"Practical" txtmarks.Text = "80"
End If
End Sub

Private Sub cmdnextphase_Click()


FeeAccounting.Show
Unload Me
End Sub

Private Sub del_Click()


Data1.Recordset.Delete
End Sub

Private Sub first_Click()


Data1.Recordset.MoveFirst
End Sub
Private Sub last_Click()
Data1.Recordset.MoveLast
End Sub

Private Sub next_Click()


Data1.Recordset.MoveNext
End Sub

Private Sub prev_Click()


Data1.Recordset.MovePrevious
End Sub

Private Sub Form_Load()


Adodc1.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=E:\subjectmaster.mdb;"

Adodc1.RecordSource = "Select * From subjectmaster"


Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
End Sub
Private Sub txtcoursename_Change()
cbosemester.Clear
If txtcoursename.Text = "BCA(Bechlor's In Computer Application)" Then
cbosemester.AddItem "'1st','2nd'"
ElseIf txtcoursename.Text = "BBA(Bachelor of Business Administration)" Then
cbosemester.AddItem "'1st','2nd'"
End If
End Sub

*OUTPUT*
Accounting

CODING:-
Private Sub cmdFetch_Click()
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cn = New
ADODB.Connection Dim
roll_no As String roll_no
= txtRoll_No.Text
Set rs = New ADODB.Recordset
rs.Open "Select
course_code,total_fees,fees_paid,payment_date,panding_fees,late_fee_fine,oth
er_fine from feesaccounting where roll_number = '" & roll_no & "'", cn,
adOpenStatic If Not rs.EOF Then txtcode.Text = rs!course_code lblfees.Caption =
rs!total_fees txtpaid.Text = rs!fees_paid txtdate.Text = rs!payment_date
txtpending.Text = rs!panding_fees txtlast.Text = rs!late_fee_fine txtother.Text =
rs!other_fine
End If
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=E:\FeeAccounting.mdb;"
Adodc1.RecordSource = "Select * From feesaccounting"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
End Sub
*OUTPUT*

You might also like