Beruflich Dokumente
Kultur Dokumente
Our objective to design this Hostel Information System project is to provide the
facilities to users to perform tasks such as Opening new accounts, editing the
existing accounts, withdrawing/depositing the money easily. All these facilities are
provided in the Hostel Information system with so easy steps that anyone knows
little about the computer can use the software easily. The following are the
objectives that are taken into account while preparing the project:-
Better Performance.
Ease of Use.
Easily availability.
Compact coding.
Nice look.
Easily understandable.
Information systems provide capabilities for entering customer details and other
1
assessment scores through an electronic pass book, building customer details, and
2
OBJECTIVE OF THE PROJECT
The main objective of the work is to demonstrate how tedious work can be
The main objective is to keep all the records in a particular file and
performing various operations on that file. There are many points, which need
# How to create the database files which contains all the records of our project.
3
DEFINITION OF THE PROBLEM
must contains the students matric No, Name, course, and year,.
To find the record as and when we want with the help of roon No and/or name of
the student.
4
HARDWARE AND SOFTWARE PLATFORM USED
Hardware Specification:
Hard Disk 20 GB
Software Specification:
version
5
ABOUT THE LANGUAGE USED IN PROJECT (VB)
interface just like Microsoft windows. Visual basic provides integrated development
environment. Visual basic provides three editions i.e. learning edition, professional
provides editor, designing, compiler & debugging capabilities. Visual basic provides
Internet features, object linking and embedding & various other capabilities to
capable of being connected to various databases. Visual basic is derived from the
language Basic.
Control
Examples of controls are command button, textbox control, label, picture box etc.
We can add more controls by right clicking on the toolbox and then by selecting
components from pop up menu. All the controls can be accessed from the toolbox.
Nearly every control has its own properties & methods. We can set the properties of
a control at design time and through coding. We can make controls responding to the
happening of events. For example: change method of textbox responds to the code
6
We can create our own controls in visual Basic & these are called ActiveX
controls. User can design their own controls or can extend the properties of existing
controls. For example: you can design a textbox control that accepts only numeric
data.
the events that occur as the program run. Each time an event occurs, it causes a
message to be sent to the operating system. The system processes the message and
broadcasts it to the other windows. Each window can then take the appropriate
action based on its own instructions for dealing with that particular message.
other application, or even from the application itself. The sequence of these events
determines the sequence in which the code executes. Thus the path through
The ToolBox
Toolbox: - It contains a set of controls that are used to place in a form at design time
thereby creating the user interface area. User can include additional controls in the
toolbox by using the Components menu item on the project menu. A Toolbox
The pointer helps to move and resize the control and Forms.
7
Label displays a text that user cannot modify or interact with. Label often used to
Textbox is a control used to display message and enter text. User can edit text
placed in the text box as and when he want but it depends on the property of the text
box if it set as not editable then user cannot change the text placed in the text box.
The List Box displays a list of items from which a user can select one.
Combo Box contains a Textbox and a List Box. This allows the user to select an
item from the dropdown List Box or to type a selection in the Textbox.
HScroll Bar and VScrollbar controls allow the user to select a value within the
DirListBox allows the user to select directories and paths, which are displayed.
OLE controls used to link or embed an object display and manipulate data from
8
PictureBox displays icons/ bitmaps and metafiles. It displays text or acts as a visual
CommandButton carries out the specified action when the user chooses it.
The OptionButton control, which is a part of an option group, allows the user to
The DriveListBox displays the valid disk drives and allows the user to select one of
them.
The FileListBox displays a set of files from which a user can select the desired one.
Data control enables the user to connect to an existing database and display
All the controls in the Toolbox except the Pointer are objects in Visual
Basic. These objects have associated properties. For example, a flower is loaded
with certain colour, shape and fragrance. Similarly, programming objects are loaded
with properties.
the characteristic of an object such as size, color, etc. or sometimes the way in which
it behaves. For example, a Textbox accepts properties such as Enabled, Font, Multi
9
Enabled property allows the Textbox to be enabled or disabled at run time depending
Multi Line property allows the Textbox to accept and display multiple lines at run
time.
Text property of the Textbox control sets a particular text in the control.
Width property sets the Textbox to the desired width at design time.
The properties that are discussed above are design time properties that can be set at
the design time by selection the Properties window. But certain properties cannot be
object. Its properties might include long white hair, blue eyes, three pounds weight,
etc. A complete definition of cat must not only encompass on its looks, but should
also include a complete itemization of its activities. Therefore, a cat's methods might
procedure, a block of code that can be invoked to impart some action on a particular
object. A method requires an object to provide them with a context. For example, the
10
word Move has no meaning in Visual Basic, but the following statement, performs a
The textbox control has other associated methods such as Refresh, Set Focus, etc.
The Refresh method enforces a complete repaint of the control or a Form. For
The Set Focus method moves the focus to the control .For example , Tex1. Set Focus
programming world to describe the interface and environment that we use to create
our applications. It is called integrated because we can access virtually all the
develop, run, test and debug our applications. With visual basic, following types of
VB.
ActiveX EXE:- Active X controls are the part of COM technology. COM
11
design individual components and code for these components. These
ActiveX Control:- Intrinsic controls are those controls, which are there in the
toolbox of visual basic whereas ActiveX controls are custom made controls,
which can be build, by the users. Intrinsic controls are standard visual basic
controls whereas you can make controls that have user specific properties.
E.g. You can design a text box control which accepts only numeric values.
4. From the toolbox add the controls for your ActiveX control.
5. Set the properties of the controls according to the function you want to be
performed.
8. Before a control can be used, appropriate entries must be created for it in the
12
can do compilation. After it is compiled, the Control is registered on the
computer.
ActiveX Document:- ActiveX documents (.dob) are similar to forms, but are
documents
Design the interface for your document; that is, the properties, methods, and
Create a project consisting of your user document and any auxiliary forms.
Compile your document to create a .vbd file and test it with all potential
target applications
to the standard EXE project type. But it automatically adds the controls that are
necessary to access database in the VB. It also adds the database ACTIVEX
13
designers to the project Explorer window which are the tools for accessing and
manipulating the database and its report. So the data project is helpful whenever we
14
COMPONENTS OF VB WINDOW
Project explorer: This is simply a list of all the forms. Which make up
your VB project? The project explorer displays a list of all forms and modules
which are called properties of that control. Some properties can be entered at design
time using this property window while other must be entered with code while the
program is owning.
Code window: This is where you type in the code that VB executes.
Notice that the heading of the window indicates which events the code is associated.
Form layout window: The form layout window shows where your
Object Browsers: It lists objects available for use in your project and
gives you a quick way to navigate through your code. You can use the object.
15
DESIGN PHASE
software development. The more time devoted in design less time required in
coding.
precisely defined. As the term implies, a Data Flow Diagram is a diagram which
depicts the precise flow of computer actions. The Data flow diagram depicts the
logic involved in the problem solution and therefore, is a step by step sequence
which the program will describe to the computer through the higher level
language instructions.
based format. It includes determining the record media, method of input, speed
Output Design: Efficient, intelligible output design should improve the systems
16
SYSTEM DOCUMENTATION
This stage is the documentation of the program so that those who use
and maintain it can understand it, so that the program can be extended to further
overlooked. Yet proper documentation is not only in the debugging and testing
phases, it also essential in the maintenance and redesign stage. A properly document
program can easily be used again when needed and undocumented program usually
requires so much extra work that the programmer might as well start from scratch.
17
CODING FOR BLOCK FORM
blockstatus = "A"
Info.Show
Unload Me
18
End Sub
blockstatus = "B"
Info.Show
Unload Me
End Sub
blockstatus = "C"
Info.Show
Unload Me
Unload Me
End Sub
End Sub
19
CODING FOR FRMSPLASH FORM
Menu.Show
Unload Me
End Sub
20
Private Sub Frame1_DragDrop(Source As Control, X As Single, Y As Single)
End Sub
End Sub
Option Explicit
21
Private cmd As New ADODB.Command
Menu.Show
Unload Me
End Sub
Report1.Show
Unload Me
End Sub
Call Report(blockstatus)
Call Report(blockstatus)
Call Report(blockstatus)
22
End If
End Sub
txtname = ""
intake = ""
position = ""
date = ""
comment = ""
End If
23
End Sub
If check Then
rekod.AddNew
rekod.Fields!Name = txtname
rekod.Fields!Matricnum = cbomatric
rekod.Fields!Course = cbocourse
rekod.Fields!Semester = cbosemester
rekod.Fields!Year = cboyear
rekod.Fields!intake = intake
rekod.Fields!Post = position
rekod.Fields!block = block
rekod.Fields!Room = cboroom
rekod.Fields!Bed = cbobed
24
rekod.Fields!date = date
rekod.Fields!Fee = cbofee
rekod.Fields!comment = comment
If check2 Then
If check3 Then
rekod.Update
txtname = ""
intake = ""
position = ""
date = ""
25
cbofee.Text = "Choose one"
comment = ""
End If
End If
End If
Call cmdrefresh_Click
End Sub
block.Caption = "A"
block.Caption = "B"
block.Caption = "C"
26
End If
Con.CursorLocation = adUseClient
Call cmdrefresh_Click
End Sub
txtname.SetFocus
cbomatric.SetFocus
cbocourse.SetFocus
27
ElseIf cbocourse = "" Then
cbocourse.SetFocus
cbosemester.SetFocus
cbosemester.SetFocus
cboyear.SetFocus
cboyear.SetFocus
intake.SetFocus
28
MsgBox "Please fill student intake.", vbExclamation
cboroom.SetFocus
cbobed.SetFocus
date.SetFocus
cbofee.SetFocus
Else
check = True
End If
End Function
29
Private Function check2() As Boolean
rekod2.Open "Select * From Studentinfo where Matricnum= '" & cbomatric & "'",
cbomatric.SetFocus
Else
check2 = True
End If
End Function
rekod2.Open "Select * From Studentinfo where Block= '" & block.Caption & "'
and Room= '" & cboroom & "' and Bed= '" & cbobed & "'", Con, adOpenStatic,
adLockOptimistic
cboroom.SetFocus
30
MsgBox "SORRY, that bed is already chose"
Else
check3 = True
End If
End Function
sql = "Select * From Studentinfo where Block='" & papar & "'"
cmd.CommandType = adCmdText
cmd.CommandText = "Select * from Studentinfo where Block='" & papar & "'"
rs.Close
MSFlexGrid1.Rows = 1
31
rekod.ActiveConnection = Con
rekod.CursorLocation = adUseClient
rekod.CursorType = adOpenDynamic
rekod.LockType = adLockOptimistic
rekod.Source = sql
rekod.Open
If rekod.EOF Then
End If
MSFlexGrid1.AddItem _
rekod!Bed
rekod.MoveNext
32
Wend
End Function
Option Explicit
Blockinfo.Show
33
Unload Me
End Sub
End
End Sub
Report1.Show
Unload Me
End Sub
End Sub
Option Explicit
34
Dim tugas As ADODB.Command
MSFlexGrid1.Rows = 1
rekod.ActiveConnection = Con
rekod.CursorLocation = adUseClient
rekod.CursorType = adOpenDynamic
rekod.LockType = adLockOptimistic
rekod.Source = sql
rekod.Open
If rekod.EOF Then
End If
35
rekod!Semester & vbTab & _
rekod!comment
rekod.MoveNext
Wend
End Function
Menu.Show
Unload Me
36
End Sub
Call lapor_msflex(sql)
End Sub
tugas.ActiveConnection = Con
tugas.CommandType = adCmdText
"'"
tugas.Execute
Call cmdviewall_Click
End Sub
37
Dim sql As String
sql = "Select * From Studentinfo where Name LIKE '" & search & "'"
Call lapor_msflex(sql)
sql = "Select * From Studentinfo where Matricnum LIKE '" & search & "'"
Call lapor_msflex(sql)
sql = "Select * From Studentinfo where Block LIKE '" & search & "'"
Call lapor_msflex(sql)
sql = "Select * From Studentinfo where Room LIKE '" & search & "'"
Call lapor_msflex(sql)
End If
End Sub
38
txtname.Text = ""
matric.Caption = ""
intake = ""
position = ""
block.Text = ""
date = ""
comment = ""
Call cmdviewall_Click
End Sub
If MsgBox("Are you sure to fill in again ??", vbYesNo + vbQuestion) = vbYes Then
39
txtname = ""
intake = ""
position = ""
block.Text = ""
date = ""
comment = ""
End If
End Sub
40
rekod.Open "Select * From Studentinfo where Matricnum= '" & matric.Caption &
If check Then
rekod.Fields!Name = txtname
rekod.Fields!Matricnum = matric
rekod.Fields!Course = cbocourse
rekod.Fields!Semester = cbosemester
rekod.Fields!Year = cboyear
rekod.Fields!intake = intake
rekod.Fields!Post = position
rekod.Fields!block = block
rekod.Fields!Room = cboroom
rekod.Fields!Bed = cbobed
rekod.Fields!date = date
rekod.Fields!Fee = cbofee
rekod.Fields!comment = comment
If check3 Then
41
rekod.Update
End If
End If
End Sub
Blockinfo.Show
Unload Me
End Sub
matric.Enabled = False
Con.CursorLocation = adUseClient
Source=" _
42
End Sub
With MSFlexGrid1
.Col = 0
txtname = .Text
.Col = 1
matric = .Text
.Col = 2
cbocourse = .Text
.Col = 3
cbosemester = .Text
.Col = 4
cboyear = .Text
.Col = 5
intake = .Text
.Col = 6
43
position = .Text
.Col = 7
block = .Text
.Col = 8
cboroom = .Text
.Col = 9
cbobed = .Text
.Col = 10
date = .Text
.Col = 11
cbofee = .Text
.Col = 12
comment = .Text
End With
End Sub
44
txtname.SetFocus
'cbomatric.SetFocus
cbocourse.SetFocus
cbocourse.SetFocus
cbosemester.SetFocus
cbosemester.SetFocus
45
ElseIf cboyear = "Choose one" Then
cboyear.SetFocus
cboyear.SetFocus
intake.SetFocus
cboroom.SetFocus
cbobed.SetFocus
date.SetFocus
46
MsgBox "Please fill the date.", vbExclamation
cbofee.SetFocus
Else
check = True
End If
End Function
rekod3.Open "Select * From Studentinfo where Block= '" & block.Text & "' and
Room= '" & cboroom & "' and Bed= '" & cbobed & "'", Con, adOpenStatic,
adLockOptimistic
If MsgBox("Are you sure the bed is right ?", vbYesNo + vbQuestion) = vbYes
Then
check3 = True
Else
47
cbobed.SetFocus
End If
Else
check3 = True
End If
End Function
48
SPLASH FORM
49
50
BLOCKFORM
51
PERSONAL DETAIL FORM
52
REPORT FORM
53
FURTHER SCOPE OF THE PROJECT
advantage to its growth and for better development, same is the case with this
system also. Computerization of this system will reduce manual workload, time
consumption and errors that are generally found in manual systems. This will help in
searching records in a better way and will also help in business growth for this
branch. If we consider the system for future basis, then we can say that in the
coming era, as computer literacy is must for everyone and market is also increasing
and growing at its peak speed, hence this system will work efficiently and step to
54
CONCLUSION
We conclude with
with speed and efficiency. We certainly can conclude that it will suffice all the needs
of our application.
55
REFERENCES
1. Programming In VB by McGraw
2. VB Complete Reference
4. Internet
56