Академический Документы
Профессиональный Документы
Культура Документы
Technology Details -
Integrated Development Environment
Introduction To Visual Basic 6.0
2. Advantages Of Visual Basic 6.0
About Visual Basic 6.0 IDE
Database and Database – Connectivity
Introduction To Micro-Soft Access
Software Requirement Specification
3. Software Requirements
Hardware Requirements
System Analysis and Design :-
4. Data Flow Diagram (DFD)/E-R
Diagram
Deploying the Project -
5. (Snap – Shots)
Showing Snap – Shots Of Project
Source – Code -
6. About Code – Editor Of VB 6.0
Code of Project
Bibliography-
7.
References : Books and Websites
Note : - The Softcopy Of Project within a CD with envelop is inside this .
(1)
INTRODUCTIO
(2)
Existing System: -
Problem Definition:-
Proposed System :-
(3)
Technology Detail’s
(4)
INTRODUCTION TO VISUAL BASIC
VISUAL BASIC is the Graphical User Interface (GUI) language. It is
the language that many developers including Microsoft themselves are using
to write new applications software, Microsoft Corporation created it in 1991.
It is a high level language. With the help of Visual Basic we can communicate
with other applications running under windows. It is an internet based and an
object oriented programming.
Visual Basic is substantially different from traditional Basic, though
there are similarities. Visual Basic requires a different approach to developing
programs and to learning the language. But in Basics, we can develop a
program line by line, testing each command as we write it. With Visual Basic
we must develop our programs and we can understand across a broader front.
In Visual Basic we can write a program by assembling the object that
we will use for screen displays and interaction with the users, adjusting the
properties of those objects, determining which events we will respond to,
thinking through the variables we need for holding data and for passing
information from one part of the program to another, and writing the
command lines that will run when events are activated. At each stage of
development we may add to or change any aspect of the program, but it must
be done with an awareness of how it will affect the other aspects. Objects,
(5)
properties events and code are all intimation. Visual Basic lets us add menus,
text boxes, command buttons, option buttons, check boxes, list boxes, scroll
bars, file and directory boxes to blank windows, we can use grids to handle
toolbar data, communicate with other window applications and access
database. We can have multiple windows on a screen. These windows have
full access to the clipboard and to the information in most other window
application running at the same line.
So Visual Basic is a collection of files. It is a very easy language and
flexible to use. This language also contains all the features of basic language.
It is an event driven programming. It is also called a friend of a user. One of
the advantages of visual basic is that it is a grammar free language. It
provides both compiler and interpreter.
(6)
In an event driven application the code doesn’t follows a predefined
path, it executes different code section in response to events. Events can be
triggered by the user action, by message from the system of other application
or even from application itself. The sequence of this event determines the
sequence in which codes executes. Thus the path through the application code
written each time the program runs.
Visual basic system knows all about event handling procedures. It
knows what a button is and how it works. It also knows how to handle images,
menus, dialog boxes, driven and directory lists, and much else. The
programmer’s job is to determine where, how and when an object appears on
screen, what its caption reads and what happens when an event occurs. The
event might be the opening of a form, the user clicking on a box. The
programmer does not have to write code to trap these events the system does
that automatically. Because the program code runs in response to event, as at
any point whole range of event might be possible. The flow of execution is not
as fixed as in a traditional program.
2/ Flexibility: It not only provides database access but can also be used to
link it with other word processor, spreadsheets software etc.
(7)
4/ Features: Various Additional Features like ADO reports and other
various types of Active X controls are supported by this application,
which helps widely in development of the Project.
MICROSOFT ACCESS
The goal of the access is to help you get your work done in the least of
time, with a minimum of effort.
About Ms Access -
(8)
The Data integrity rules of the relational models can be defined within
Access relationship using integrity constraints. When a table is created in
Access the integrity rule is defied at that very time.
(9)
Software Reuirement Specification
The following are the minimum requirement for the smooth and successful
running of the module.
Hardware: -
( 10 )
- Min 1GB for Operating system & program
to setup properly.
Software: -
RDBMS - MS Access
SYSTEM ANALYSIS
( 11 )
System Analysis
A system is a set or arrangement of functionally dependent
component or working together to attain a predefined goal by processing
information. It is the process of examine of a business situation with the intent
of improving it through better procedure and method. It is the process of
gathering and method. It is process gathering and interpreting facts.
Analysis objective
An efficient system analysis always plays the role of strong
foundation for development of any proposed system. Information play key
( 12 )
role, as the horizon of knowledge keep on expending, since this project is
anaphor to convert the manual in to computer based system, a through
knowledge of the day-to-day functions of present system of mandatory the
objective of this study comprise.
E-R DIAGARAM
( 13 )
( 14 )
2) E-R Diagram Between Purchase & stock-balance
DATABASE DESIGN
LOGIN FORM
ADD NEW RECORD FORM
Else
MsgBox "Invalid user name or Password, try again!", , "Login"
Me.txtUserName = ""
Me.txtPassword = ""
txtUserName.SetFocus
End If
End Sub
PURCHASE FORM
Private Sub cmdadd_Click()
End Sub
Me.dtp.Value = Date
Me.txtquantity.Text = ""
Me.txtsprice.Text = ""
Me.txtice.Text = ""
Me.txtuprice.Text = ""
Me.lbltprice.Caption = ""
End Sub
SALE FORM
Function SpellNumber(ByVal MyNumber)
MyNumber = Trim(Str(MyNumber))
DecimalPlace = InStr(MyNumber, ".")
If DecimalPlace > 0 Then
Paise = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & _
"00", 2))
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
End If
Count = 1
Do While MyNumber <> ""
If Count <> 1 Then
Temp = GetHundreds(Right(MyNumber, 2))
If Temp <> "" Then Rupees = Temp & Place(Count) & Rupees
If Len(MyNumber) > 2 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 2)
Else
MyNumber = ""
End If
Else
Temp = GetHundreds(Right(MyNumber, 3))
If Temp <> "" Then Rupees = Temp & Place(Count) & Rupees
If Len(MyNumber) > 3 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber = ""
End If
End If
Count = Count + 1
Loop
Select Case Rupees
Case ""
Rupees = " "
Case "One"
Rupees = "Re One "
Case Else
Rupees = "Rupees " & Rupees
End Select
Select Case Paise
Case ""
Paise = " Zero Paise "
Case "One"
Paise = " and Paise One"
Case Else
Paise = "Paise " & Paise
End Select
If Rupees <> " " Then Paise = " and " & Paise
SpellNumber = " [ " & Rupees & Paise & " Only ] "
End Function
Function GetTens(TensText)
Dim Result As String
Result = ""
If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19...
Select Case Val(TensText)
Case 10: Result = "Ten"
Case 11: Result = "Eleven"
Case 12: Result = "Twelve"
Case 13: Result = "Thirteen"
Case 14: Result = "Fourteen"
Case 15: Result = "Fifteen"
Case 16: Result = "Sixteen"
Case 17: Result = "Seventeen"
Case 18: Result = "Eighteen"
Case 19: Result = "Nineteen"
Case Else
End Select
Else ' If value between 20-99...
Select Case Val(Left(TensText, 1))
Case 2: Result = "Twenty "
Case 3: Result = "Thirty "
Case 4: Result = "Forty "
Case 5: Result = "Fifty "
Case 6: Result = "Sixty "
Case 7: Result = "Seventy "
Case 8: Result = "Eighty "
Case 9: Result = "Ninety "
Case Else
End Select
Result = Result & GetDigit _
(Right(TensText, 1)) ' Retrieve ones place.
End If
GetTens = Result
End Function
Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit = "One"
Case 2: GetDigit = "Two"
Case 3: GetDigit = "Three"
Case 4: GetDigit = "Four"
Case 5: GetDigit = "Five"
Case 6: GetDigit = "Six"
Case 7: GetDigit = "Seven"
Case 8: GetDigit = "Eight"
Case 9: GetDigit = "Nine"
Case Else: GetDigit = ""
End Select
End Function
Private Sub cmbice_Click()
Dim rs As New ADODB.Recordset
rs.Open "select * from purchase where ice_name ='" & Me.cmbice.Text & "'", dbcon, 2,
3
If rs.RecordCount = 0 Then
Me.lbluprice.Caption = "no record"
Else
Me.lbluprice.Caption = rs!price_to_sell
Me.lblquan.Caption = rs!quantity
End If
Me.lbltprice.Caption = Val(Me.lbluprice) * Val(Me.txtquan.Text)
End Sub
lst.SubItems(2) = Me.lbluprice.Caption
lst.SubItems(3) = Me.lbltprice.Caption
Me.cmbremove.AddItem Me.cmbice.Text
Me.lblgrandtotal.Caption = Val(Me.lblgrandtotal.Caption) + Val(Me.lbltprice.Caption)
Me.lblinwords.Caption = SpellNumber(Val(Me.lblgrandtotal.Caption))
rs("quantity") = Val(Me.lblquan.Caption) - Val(Me.txtquan.Text)
rs.Update
rs.Close
Me.txtquan.Text = ""
Me.lbltprice.Caption = ""
Me.lbluprice.Caption = ""
Me.lblquan.Caption = ""
Me.cmbice.SetFocus
End Sub
End Sub
'Exit Sub
'msg:
'MsgBox "printer not found", vbCritical, "error"
Me.cmbice.Clear
Form_Load
End If
End If
End Sub
m = Me.cmbremove.ListCount
If m <= 0 Then
Me.lblgrandtotal.Caption = 0
Me.lblinwords.Caption = SpellNumber(Val(Me.lblgrandtotal.Caption))
End If
End Sub
Next
'MsgBox "saved !"
frmgif.Show 1
Me.Timer1.Enabled = False
Me.cmdremove.Enabled = False
Me.cmdshow.Visible = False
Me.cmdshow2.Visible = True
Me.cmdprint.Enabled = True
End Sub
End Sub
Else
Me.txtpaid.Text = ""
End If
If Val(Me.txtpaid.Text) > Val(Me.lblgrandtotal.Caption) Then
MsgBox "Entered amount should be less then grand total", vbInformation, "cant
accept"
Me.txtpaid.Text = ""
End If
End Sub
Else
Exit Sub
End If
Else
Me.txtquan.Text = ""
End If
End Sub
MAINTAINS FORM
Private Sub cmbbill_Click()
On Error Resume Next
Me.cmdupdate2.Enabled = True
Me.txttpaid.Enabled = True
Me.txttpaid.Text = ""
Me.lblubal.Caption = ""
Dim rs As New ADODB.Recordset
rs.Open "select * from sales where bill_no=" & Me.cmbbill.Text, dbcon, 2, 3
Me.cmbcustname.Text = rs!customer_name
Me.lbltotal.Caption = rs!grand_total
Me.lblpaid.Caption = rs!paid
Me.lblbal.Caption = rs!balance
End Sub
Me.dtp.Value = rs!Date
Me.lbltprice.Caption = rs!total_price
End If
End Sub
End Sub
Private Sub cmddelete2_Click()
n = MsgBox("sure to delete " + Me.cmbcustname.Text + "'s record", vbYesNo, "sure")
If n = vbNo Then
Me.cmddelete2.Cancel = True
Else
Dim rs As New ADODB.Recordset
rs.Open "delete * from credit where bill_no=" & Me.cmbbill.Text, dbcon, 2, 3
rs.Open "delete * from sales where bill_no=" & Me.cmbbill.Text, dbcon, 2, 3
Me.cmbbill.Text = ""
Me.cmbcustname.Text = ""
Me.lblbal.Caption = ""
Me.lblpaid.Caption = ""
Me.lbltotal.Caption = ""
Me.txttpaid.Text = ""
Me.lblubal.Caption = ""
MsgBox "record deleted", vbInformation, "info"
Me.cmbbill.Clear
Me.cmbcustname.Clear
Form_Load
Me.Frame2.Visible = True
Me.frame1.Visible = False
End If
End Sub
Me.txtpur.Text = ""
Me.txtquantity.Text = ""
Me.txtsprice.Text = ""
Me.txtuprice.Text = ""
Me.lbltprice.Caption = ""
MsgBox "record deleted", vbInformation, "info"
Me.cmbstone.Clear
Form_Load
Me.frame1.Visible = True
Me.Frame2.Visible = False
End If
End Sub
End Sub
Private Sub cmdexit2_Click()
End Sub
rs("quantity") = Val(Me.txtquantity.Text)
rs("unit_price") = Val(Me.txtuprice.Text)
rs("total_price") = Val(Me.lbltprice.Caption)
rs("price_to_sell") = Val(Me.txtsprice.Text)
rs.Update
rs.Close
MsgBox "updated", vbInformation, "information"
Me.txtpur.Text = ""
Me.txtquantity.Text = ""
Me.txtsprice.Text = ""
Me.txtuprice.Text = ""
Me.lbltprice.Caption = ""
Me.cmbstone.SetFocus
End Sub
Me.txttpaid.Enabled = False
Me.frame1.Visible = False
Me.Frame2.Visible = False
dtp.Value = Date
Dim rs As New ADODB.Recordset
Dim n As Integer
rs.Open "select * from purchase", dbcon, 2, 3
If rs.RecordCount = 0 Then
Me.cmbstone.AddItem "NO RECORD INSERTD YET"
rs.Close
Else
rs.MoveFirst
For n = 1 To rs.RecordCount
Me.cmbstone.AddItem rs.Fields(2)
rs.MoveNext
Next
rs.Close
End If
rs.Open "select * from sales", dbcon, 2, 3
If rs.RecordCount = 0 Then
Me.cmdupdate2.Enabled = False
Me.cmbcustname.AddItem "NO INVOICE RECORD YET"
Me.cmbbill.AddItem "NO INVOICE RECORD YET"
rs.Close
Else
rs.MoveFirst
For n = 1 To rs.RecordCount
Me.cmbcustname.AddItem rs.Fields(2)
Me.cmbbill.AddItem rs.Fields(1)
rs.MoveNext
Next
rs.Close
End If
Me.dtp2.Value = Date
Me.dtp.Value = Date
End Sub
Else
Me.cmdupdate2.Enabled = True
End If
Else
Me.cmddelete2.Enabled = True
End If
End If
If Me.txttpaid.Text = "" Then
Me.lblubal.Caption = ""
End If
End Sub
End Sub
CONCLUSION
Conclusion :-
Designed system provides an easy way to interact with user and
administrator. This GUI based system gives a system with less
paper work and less memory overhead. It is also a fast and
interactive system.
BIBLIOGRAPHY
BIBLIOGRAPHY:
1/ Mr. Steven Holzner, Visual Basic 6 Programming (Black Book), 2006
edition, Dreamtech Press, New Delhi, 2002.