Sie sind auf Seite 1von 89

TOPIC INSURANCE MANAGEMENT

A dissertation submitted in partial fulfilment of the requirements for


computer applications lab
(BBA-Vth sem)

GURU GOBIND SINGH INDRAPRASTHA UNIVERSITY


KASHMERE GATE, DELHI-110006

BY
NAME – Sneha Bisht
ENROLLMENT NO. -0831921707
COURSE BBA 5TH SEM

UNDER THE SUPERVISION OF


GUIDE NAME – Ms. Gayatri

DEPARTMENT
LINGAYA’S LALITA DEVI INSTITUTE OF MANAGEMENT & SCIENCE
AFFLIATED TO GGSIP UNIVERSITY
KASHMERE GATE, NEW DELHI

1
ACKNOWLEDGEMENT

This report has been made possible through direct and indirect support of
various people for whom I wish to express my appreciation and gratitude.

Nothing in the World can be achieved without proper coordination .Every


work, be it of marketing, finance, production or successful launching of a
product is the result of teamwork. This project of mine could not have seen
the light of the day without the coordination of Ms. Gayatri, my project
guide. I would like to express my special thanks and gratitude to her for
constantly guiding me and tackling a variety of hurdles with implicit patience
throughout my research project and whose deep involvement and interest,
infused in my great inspiration and confidence in taking up this study in the
right direction .Without her overall guidance and help, the project may not
have been completed.

Sneha Bisht
BBA 5rd SEM
0831921707

2
CERTIFICATE

This is to certify that the Dissertation title is INSURANCE


MANAGEMENT bonafide & original Research work done by
Sneha Bisht Student of GGS INDRAPRASTHA UNIVERSITY,
under my Supervision and guidance.
This Subject on which this dissertation has been written by her
original contribution towards the discipline of Management and
it has not previously formed the basis for the award of the
Degree, Diploma, or other similar title to any candidate
This Dissertation represents entirely an independent research
work of the candidate under my guidance.

DATE :
PLACE :

(GUIDE SIGNATURE)

3
Content

S.no Content Page No.


1. Insurance automation system 3
2. Abstract 5
3. Introduction 15
4. Data base 19
5. Design screens 39
6. Bibliography 86

4
INSURANCE
AUTOMATION
SYSTEM

5
INSURANCE AUTOMATION SYSTEM

Multiple insures, liundreds of policies, thousands of data entries and a steady


stream of claims documents & customer services requests as agents are expands their Business
with internet sales & other aspects of E-commerce, this becomes more complicated.

Now in competitive world , All the companies are based on PC. Due to the
competitive world. and the most important savings for our life is insurance, so the insurance
automation is most important. In the competitive world , accidents are taking place, insuring
our life is important so the insurance automation is the project that we chosen.

Insurance automation system application :

 Project Frond End : Visual – Basic .net


Back End : Access

 Project Modules :

I. GENERAL :All the description such as details of Policies , Agents , Branch , Information
will be in this module.

II. CUSTOMER MODULE :


• Customer details (DB)
• Customer’s policy details
• Due date ,Premium amount Repots
• Other Reports.

III. ADMIN MODULE :


• Agent details
• New policy updating
• Edition of policy
• Policies details
• Customer wise policy (Reports)
• Due wise policy (Reports) etc..,
IV.OTHER:
• Counseling details (Customer details)
• Premium calculation ,utilities.

6
ABSTRACT

7
ABSTRACT

• Spread Life Insurance widely and in particular to the rural areas and to the
socially and economically backward classes with a view to reaching all
insurable persons in the country and providing them adequate financial cover
against death at a reasonable cost.

• Maximize mobilization of people's savings by making insurance-linked


savings adequately attractive.

• Bear in mind, in the investment of funds, the primary obligation to its


policyholders, whose money it holds in trust, without losing sight of the
interest of the community as a whole; the funds to be deployed to the best
advantage of the investors as well as the community as a whole, keeping in
view national priorities and obligations of attractive return.

• Conduct business with utmost economy and with the full realization that the
moneys belong to the policyholders.

• Act as trustees of the insured public in their individual and collective


capacities.

• Meet the various life insurance needs of the community that would arise in
the changing social and economic environment.

• Involve all people working in the Corporation to the best of their capability
in furthering the interests of the insured public by providing efficient service
with courtesy.

• Promote amongst all agents and employees of the Corporation a sense of participation,
pride and job satisfaction through discharge of their duties with dedication towards
achievement of Corporate Objective.

Brief History Of Insurance


The story of insurance is probably as old as the story of mankind. The same instinct
that prompts modern businessmen today to secure themselves against loss and
disaster existed in primitive men also. They too sought to avert the evil
consequences of fire and flood and loss of life and were willing to make some sort of
sacrifice in order to achieve security. Though the concept of insurance is largely a
development of the recent past, particularly after the industrial era – past few

8
centuries – yet its beginnings date back almost 6000 years.

Life Insurance in its modern form came to India from England in the year 1818.
Oriental Life Insurance Company started by Europeans in Calcutta was the first life
insurance company on Indian Soil. All the insurance companies established during
that period were brought up with the purpose of looking after the needs of European
community and Indian natives were not being insured by these companies. However,
later with the efforts of eminent people like Babu Muttylal Seal, the foreign life
insurance companies started insuring Indian lives. But Indian lives were being
treated as sub-standard lives and heavy extra premiums were being charged on them.
Bombay Mutual Life Assurance Society heralded the birth of first Indian life
insurance company in the year 1870, and covered Indian lives at normal rates.
Starting as Indian enterprise with highly patriotic motives, insurance companies
came into existence to carry the message of insurance and social security through
insurance to various sectors of society. Bharat Insurance Company (1896) was also
one of such companies inspired by nationalism. The Swadeshi movement of 1905-
1907 gave rise to more insurance companies. The United India in Madras, National
Indian and National Insurance in Calcutta and the Co-operative Assurance at Lahore
were established in 1906. In 1907, Hindustan Co-operative Insurance Company took
its birth in one of the rooms of the Jorasanko, house of the great poet Rabindranath
Tagore, in Calcutta. The Indian Mercantile, General Assurance and Swadeshi Life
(later Bombay Life) were some of the companies established during the same period.
Prior to 1912 India had no legislation to regulate insurance business. In the year
1912, the Life Insurance Companies Act, and the Provident Fund Act were passed.
The Life Insurance Companies Act, 1912 made it necessary that the premium rate
tables and periodical valuations of companies should be certified by an actuary. But
the Act discriminated between foreign and Indian companies on many accounts,
putting the Indian companies at a disadvantage.

The first two decades of the twentieth century saw lot of growth in insurance
business. From 44 companies with total business-in-force as Rs.22.44 crore, it rose
to 176 companies with total business-in-force as Rs.298 crore in 1938. During the
mushrooming of insurance companies many financially unsound concerns were also
floated which failed miserably. The Insurance Act 1938 was the first legislation
governing not only life insurance but also non-life insurance to provide strict state
control over insurance business. The demand for nationalization of life insurance
industry was made repeatedly in the past but it gathered momentum in 1944 when a
bill to amend the Life Insurance Act 1938 was introduced in the Legislative
Assembly. However, it was much later on the 19th of January, 1956, that life
insurance in India was nationalized. About 154 Indian insurance companies, 16 non-
Indian companies and 75 provident were operating in India at the time of
nationalization. Nationalization was accomplished in two stages; initially the
management of the companies was taken over by means of an Ordinance, and later,

9
the ownership too by means of a comprehensive bill. The Parliament of India passed
the Life Insurance Corporation Act on the 19th of June 1956, and the Life Insurance
Corporation of India was created on 1st September, 1956, with the objective of
spreading life insurance much more widely and in particular to the rural areas with a
view to reach all insurable persons in the country, providing them adequate financial
cover at a reasonable cost.

LIC had 5 zonal offices, 33 divisional offices and 212 branch offices, apart from its
corporate office in the year 1956. Since life insurance contracts are long term
contracts and during the currency of the policy it requires a variety of services need
was felt in the later years to expand the operations and place a branch office at each
district headquarter. re-organization of LIC took place and large numbers of new
branch offices were opened. As a result of re-organisation servicing functions were
transferred to the branches, and branches were made accounting units. It worked
wonders with the performance of the corporation. It may be seen that from about
200.00 crores of New Business in 1957 the corporation crossed 1000.00 crores only
in the year 1969-70, and it took another 10 years for LIC to cross 2000.00 crore
mark of new business. But with re-organisation happening in the early eighties, by
1985-86 LIC had already crossed 7000.00 crore Sum Assured on new policies.

Today LIC functions with 2048 fully computerized branch offices, 100 divisional
offices, 7 zonal offices and the Corporate office. LIC’s Wide Area Network covers
100 divisional offices and connects all the branches through a Metro Area Network.
LIC has tied up with some Banks and Service providers to offer on-line premium
collection facility in selected cities. LIC’s ECS and ATM premium payment facility
is an addition to customer convenience. Apart from on-line Kiosks and IVRS, Info
Centres have been commissioned at Mumbai, Ahmedabad, Bangalore, Chennai,
Hyderabad, Kolkata, New Delhi, Pune and many other cities. With a vision of
providing easy access to its policyholders, LIC has launched its SATELLITE
SAMPARK offices. The satellite offices are smaller, leaner and closer to the
customer. The digitalized records of the satellite offices will facilitate anywhere
servicing and many other conveniences in the future. LIC continues to be the
dominant life insurer even in the liberalized scenario of Indian insurance and is
moving fast on a new growth trajectory surpassing its own past records. LIC has
issued over one crore policies during the current year. It has crossed the milestone of
issuing 1,01,32,955 new policies by 15th Oct, 2005, posting a healthy growth rate of
16.67% over the corresponding period of the previous year. From then to now, LIC
has crossed many milestones and has set unprecedented performance records in
various aspects of life insurance business. The same motives which inspired our
forefathers to bring insurance into existence in this country inspire us at LIC to take
this message of protection to light the lamps of security in as many homes as
possible and to help the people in providing security to their families.

10
Mission
"Explore and enhance the quality of life of people through financial security by
providing products and services of aspired attributes with competitive returns, and
by rendering resources for economic development."

Vision
"A trans-nationally competitive financial conglomerate of significance to societies
and Pride of India."

Life insurance in India made its debut well over 100 years ago.

In our country, which is one of the most populated in the world, the prominence of
insurance is not as widely understood, as it ought to be. What follows is an attempt to
acquaint readers with some of the concepts of life insurance, with special reference to
LIC.

It should, however, be clearly understood that the following content is by no means an


exhaustive description of the terms and conditions of an LIC policy or its benefits or
privileges.

For more details, please contact our branch or divisional office. Any LIC Agent will be
glad to help you choose the life insurance plan to meet your needs and render policy
servicing.

What Is Life Insurance?

Life insurance is a contract that pledges payment of an amount to the person assured (or
his nominee) on the happening of the event insured against.

The contract is valid for payment of the insured amount during:

• The date of maturity, or


• Specified dates at periodic intervals, or
• Unfortunate death, if it occurs earlier.

Among other things, the contract also provides for the payment of premium periodically

11
to the Corporation by the policyholder. Life insurance is universally acknowledged to
be an institution, which eliminates 'risk', substituting certainty for uncertainty and comes
to the timely aid of the family in the unfortunate event of death of the breadwinner.
By and large, life insurance is civilisation's partial solution to the problems caused by
death. Life insurance, in short, is concerned with two hazards that stand across the life-
path of every person:

1. That of dying prematurely leaving a dependent family to fend for itself.


2. That of living till old age without visible means of support.

Life Insurance Vs. Other Savings

Contract Of Insurance:
A contract of insurance is a contract of utmost good faith technically known as uberrima
fides. The doctrine of disclosing all material facts is embodied in this important
principle, which applies to all forms of insurance.

At the time of taking a policy, policyholder should ensure that all questions in the
proposal form are correctly answered. Any misrepresentation, non-disclosure or fraud in
any document leading to the acceptance of the risk would render the insurance contract
null and void.

Protection:
Savings through life insurance guarantee full protection against risk of death of the
saver. Also, in case of demise, life insurance assures payment of the entire amount
assured (with bonuses wherever applicable) whereas in other savings schemes, only the
amount saved (with interest) is payable.

Aid To Thrift:
Life insurance encourages 'thrift'. It allows long-term savings since payments can be
made effortlessly because of the 'easy instalment' facility built into the scheme.
(Premium payment for insurance is either monthly, quarterly, half yearly or yearly). For
example: The Salary Saving Scheme popularly known as SSS, provides a convenient
method of paying premium each month by deduction from one's salary.
In this case the employer directly pays the deducted premium to LIC. The Salary Saving
Scheme is ideal for any institution or establishment subject to specified terms and
conditions.
Liquidity:
In case of insurance, it is easy to acquire loans on the sole security of any policy that has
acquired loan value. Besides, a life insurance policy is also generally accepted as
security, even for a commercial loan.

12
Tax Relief:
Life Insurance is the best way to enjoy tax deductions on income tax and wealth tax.
This is available for amounts paid by way of premium for life insurance subject to
income tax rates in force.
Assessees can also avail of provisions in the law for tax relief. In such cases the assured
in effect pays a lower premium for insurance than otherwise.

Money When You Need It:


A policy that has a suitable insurance plan or a combination of different plans can be
effectively used to meet certain monetary needs that may arise from time-to-time.
Children's education, start-in-life or marriage provision or even periodical needs for
cash over a stretch of time can be less stressful with the help of these policies.
Alternatively, policy money can be made available at the time of one's retirement from
service and used for any specific purpose, such as, purchase of a house or for other
investments. Also, loans are granted to policyholders for house building or for purchase
of flats (subject to certain conditions).

Who Can Buy A Policy?

Any person who has attained majority and is eligible to enter into a valid contract can
insure himself/herself and those in whom he/she has insurable interest.

Policies can also be taken, subject to certain conditions, on the life of one's spouse or
children. While underwriting proposals, certain factors such as the policyholder’s state
of health, the proponent's income and other relevant factors are considered by the
Corporation.

Insurance For Women

Prior to nationalisation (1956), many private insurance companies would offer


insurance to female lives with some extra premium or on restrictive conditions.
However, after nationalisation of life insurance, the terms under which life insurance is
granted to female lives have been reviewed from time-to-time.

At present, women who work and earn an income are treated at par with men. In other
cases, a restrictive clause is imposed, only if the age of the female is up to 30 years and
if she does not have an income attracting Income Tax.

13
Medical And Non-Medical Schemes

Life insurance is normally offered after a medical examination of the life to be assured.
However, to facilitate greater spread of insurance and also to avoid inconvenience, LIC
has been extending insurance cover without any medical examination, subject to certain
conditions.

With Profit And Without Profit Plans

An insurance policy can be 'with' or 'without' profit. In the former, bonuses disclosed, if
any, after periodical valuations are allotted to the policy and are payable along with the
contracted amount.

In 'without' profit plan the contracted amount is paid without any addition. The premium
rate charged for a 'with' profit policy is therefore higher than for a 'without' profit policy.

Keyman Insurance

Keyman insurance is taken by a business firm on the life of key employee(s) to protect the firm against
financial losses, which may occur due to the premature demise of the Keyman.

We Operate All Over India

14
LIC has been one of the pioneering organizations in India who introduced the leverage
of Information Technology in servicing and in their business. Data pertaining to almost
10 crore policies is being held on computers in LIC. We have gone in for relevant and
appropriate technology over the years.

1964 saw the introduction of computers in LIC. Unit Record Machines introduced in
late 1950’s were phased out in 1980’s and replaced by Microprocessors based
computers in Branch and Divisional Offices for Back Office Computerization.
Standardization of Hardware and Software commenced in 1990’s. Standard Computer
Packages were developed and implemented for Ordinary and Salary Savings Scheme
(SSS) Policies.

FRONT END OPERATIONS


With a view to enhancing customer responsiveness and services , in July 1995, LIC started a
drive of On Line Service to Policyholders and Agents through Computer. This on line service
enabled policyholders to receive immediate policy status report , prompt acceptance of their
premium and get Revival Quotation, Loan Quotation on demand. Incorporating change of
address can be done on line. Quicker completion of proposals and dispatch of policy
documents have become a reality. All our 2048 branches across the country have been covered
under front-end operations. Thus all our 100 divisional offices have achieved the distinction of
100% branch computerisation. New payment related Modules pertaining to both ordinary &
SSS policies have been added to the Front End Package catering to Loan, Claims and
Development Officers’ Appraisal. All these modules help to reduce time-lag and ensure
accuracy.

15
METRO AREA NETWORK
A Metropolitan Area Network, connecting 74 branches in Mumbai was commissioned
in November, 1997, enabling policyholders in Mumbai to pay their Premium or get their
Status Report, Surrender Value Quotation, Loan Quotation etc. from ANY Branch in
the city. The System has been working successfully. More than 10,000 transactions are
carried out over this Network on any given working day. Such Networks have been
implemented in other cities also.

WIDE AREA NETWORK


All 7 Zonal Offices and all the MAN centres are connected through a Wide Area
Network (WAN). This will enable a customer to view his policy data and pay premium
from any branch of any MAN city. As at November 2005, we have 91 centers in India
with more than 2035 branches networked under WAN.

INTERACTIVE VOICE RESPONSE SYSTEMS (IVRS)


IVRS has already been made functional in 59 centers all over the country. This would
enable customers to ring up LIC and receive information (e.g. next premium due,
Status, Loan Amount, Maturity payment due, Accumulated Bonus etc.) about their
policies on the telephone. This information could also be faxed on demand to the
customer.

LIC ON THE INTERNET


Our Internet site is an information bank. We have displayed information about LIC &
its offices . Efforts are on to upgrade our web site to make it dynamic and
interactive.The addresses/e-mail Ids of ur Zonal Offices, Zonal Training Centers,
Management Development Center, Overseas Branches, Divisional Offices and also all
Branch Offices with a view to speed up the communication process.

PAYMENT OF PREMIUM AND POLICY STATUS ON INTERNET


(You have to register for these services)
LIC has given its policyholders a unique facility to pay premiums through Internet
absolutely free and also view their policy details on Internet premium payments.There
are 11 service providers with whom L I C has signed the agreement to provide this
service.
INFORMATION KIOSKS
We have set up 150 Interactive Touch screen based Multimedia KIOSKS in prime
locations in metros and some major cities for dissemination information to general
public on our products and services. These KIOSKS are enable to provide policy details

16
and accept premium payments.

INFO CENTRES
We have also set up 8 call centres, manned by skilled employees to provide you with
information about our Products, Policy Services, Branch addresses and other
organizational information.

17
INTRODUCTION

INTRODUCTION
The Life Insurance Corporation of India (Hindi: भभभभभभ भभभभ भभभभ भभभभ) (LIC)
is the largest life insurance company in India and also the country's largest investor.; it is
fully owned by the Government of India. It also funds close to 24.6% of the Indian
Government's expenses.It has assets estimated of 5 Trillion Rupees. It was founded in
1956.

Headquartered in Mumbai, which is considered the financial capital of India, the Life
Insurance Corporation of India currently has 8 zonal Offices and 101 divisional offices
located in different parts of India, at least 2048 branches located in different cities and
towns of India along with satellite Offices attached to about some 50 Branches, and has a
network of around 1.2 million agents for soliciting life insurance business from the
public,

Today LIC can boast of great achievements in IT and investment under able
Chairmanship of T S Vijayan. After years of poor performance despite near monopoly,
LIC started showing performance under G N Bajpai and again went into slip under
succeeding chairman till T S Vijayan took over. He faded G N Bajpai into oblivion ably

18
supported by HR initiatives taken by another Genius K B Saha despite serious internal
war by MDs. People criticise LIC about large scale miss selling and holes in investment
but nobody criticises LIC's superb HR initiatives under sharpest ever HR ED K B Saha
and IT initiatives directly under T S Vijayan, the tallest of the Chairmen of LIC.

History
The Oriental Life Insurance Company, the first corporate entity in India offering life
insurance coverage, was established in Calcutta in 1818 by Bipin Behari Dasgupta and
others. Europeans in India were its primary target market, and it charged Indians heftier
premiums. The Bombay Mutual Life Assurance Society, formed in 1870, was the first
native insurance provider. Other insurance companies established in the pre-
independence era included

Bharat Insurance Company (1896)


United India (1906)
National Indian (1906)
National Insurance (1906)
Co-operative Assurance (1906)
Hindustan Co-operatives (1907)
Indian Mercantile
General Assurance
Swadeshi Life (later Bombay Life)
The first 150 years were marked mostly by turbulent economic conditions. It witnessed,
India's First War of Independence, adverse effects of the World War I and World War II
on the economy of India, and in between them the period of world wide economic crises
triggered by the Great depression. The first half of the 20th century also saw a heightened
struggle for India's independence. The aggregate effect of these events led to a high rate
of bankruptcies and liquidation of life insurance companies in India. This had adversely
affected the faith of the general public in the utility of obtaining life cover.
The LIFE INSURANCE Act and the Provident Fund Act were passed in 1912, providing
the first regulatory mechanisms in the Life Insurance industry. The Indian Insurance
Companies Act of 1928 authorized the government to obtain statistical information from
companies operating in both life and non-life insurance areas. The subsequent Insurance
Act of 1938 brought stricter state control over an industry that had seen several
financially unsound ventures fail. A bill was also introduced in the Legislative Assembly
in 1944 to nationalize the insurance industry.
Nationalization
In 1955, parliamentarian Feroze Gandhi raised the matter of insurance fraud by owners of
private insurance companies. In the ensuing investigations, one of India's wealthiest
businessmen, Ram Kishan Dalmia, owner of the Times of India newspaper, was sent to
prison for two years. Eventually, the Parliament of India passed the Life Insurance of
India Act on 1956-06-19, and the Life Insurance Corporation of India was created on
1956-09-01, by consolidating the life insurance business of 245 private life insurers and

19
other entities offering life insurance services. Nationalization of the life insurance
business in India was a result of the Industrial Policy Resolution of 1956, which had
created a policy framework for extending state control over at least seventeen sectors of
the economy, including the life insurance. The company began operations with 5 zonal
offices, 33 divisional offices and 212 branch offices.
Current status
Over its existence of around 50 years, Life Insurance Corporation of India, which
commanded a monopoly of soliciting and selling life insurance in India, created huge
surpluses, and contributed around 7 % of India's GDP in 2006.
The Corporation, which started its business with around 300 offices, 5.6 million policies
and a corpus of INR 459 million (US$ 10 million), has grown to 25000 servicing around
180 million policies and a corpus of over INR 3.4 trillion (US$ 80000 million).
The organization now comprises 2048 branches, 109 divisional offices and 8 zonal
offices, and employs over 1,002,149 agents.The corporate Office of LIC is in Mumbai. It
also operates in 12 other countries, primarily to cater to the needs of Non Resident
Indians.
With the change in the India's economic philosophy from the early 1990s, and the
subsequent relaxation of state control over several sectors of the economy, the
monopolistic position of the Life Insurance Corporation of India was diluted, and it has
had to compete with a number of other corporate entities, Indian as well as transnational
Life Insurance brands. However, it still manages to be the largest player in the Indian
market, with the lion's share of 55%.
The recent Economic Times Brand Equity Survey rated LIC as the No. 1 Service Brand
of the Country.
In the financial year 2006-07 Life Insurance Corporation of India's number of policy
holders are said to have crossed a whopping 200 million (fourth in terms of population of
the countries of the world)
Subsidiaries

20
21
DATA BASES

Data base

22
Bond table

23
Bond design

24
Customer insurance table

25
Customer table design

26
Insurance table

27
Insurance table design

28
Insurance policy table

29
Insurance policy table design

30
New customer table

31
New customer design

32
Nominees table

33
Nominees table design

34
Old pay table

35
Old pay table design

36
Register table

37
Register table design

38
User table

39
User table design

40
Design screen

41
Log in screen

42
43
Coding
Private Sub Command1_Click()
Data1.Recordset.MoveFirst
Do Until Data1.Recordset.EOF
If (Text1.Text = (Data1.Recordset.Fields(0).Value)) Then
If (Text2.Text = (Data1.Recordset.Fields(1).Value)) Then
Me.Hide
MDIForm1.Show
Else
MsgBox "Check your password"
End If
Else
MsgBox "Check the user id"
End If
Data1.Recordset.MoveNext
If ((Text1.Text = admin) And (Text1.Text = admin)) Then
Me.Hide
MDIForm1.Show
End If
Loop
End Sub

Private Sub Form_Load()


Text1 = ""
Text2 = ""
'Text1.SetFocus
End Sub

44
Mdi main screen

45
Coding
Private Sub abt_Click()
frmAbout.Show
End Sub

Private Sub abtinsur_Click()


Form13.Show
End Sub

Private Sub app_Click()


Form14.Show
End Sub

Private Sub ar_Click()


Me.Arrange vbArrangeIcons
End Sub

Private Sub auth_Click()


Form11.Show
End Sub

Private Sub bond_Click()


Form7.Show
End Sub

Private Sub brow_Click()


frmBrowser.Show
End Sub

Private Sub calcu_Click()


'Shell (calculator.exe)

MsgBox "Under construction"


End Sub

Private Sub casc_Click()


Me.Arrange vbCascade
End Sub

Private Sub exit_Click()


End
End Sub

Private Sub horiz_Click()


Me.Arrange vbHorizontal
End Sub

Private Sub icoun_Click()


Form5.Show

46
End Sub

Private Sub icouns_Click()


Form1.Show
End Sub

Private Sub inst_Click()


Form4.Show
End Sub

Private Sub ipolicy_Click()


Form3.Show
End Sub

Private Sub iregister_Click()


Form2.Show
End Sub

Private Sub new_Click()


Form16.Show
End Sub

Private Sub NOTE_Click()


MsgBox "Under construction"

End Sub

Private Sub payment_Click()


Form8.Show
End Sub

Private Sub pol_Click()


Form12.Show
End Sub

Private Sub prem_Click()


Form9.Show
End Sub

Private Sub report_Click()


Form10.Show
End Sub

Private Sub vert_Click()


Me.Arrange vbVertical
End Sub

Private Sub xcust_Click()


Form6.Show
End Sub

47
Counselling form

48
Coding
Private Sub Command1_Click()
Data1.Recordset.AddNew
Data1.Recordset.Fields(0) = Text1.Text
Data1.Recordset.Fields(1) = Text2.Text
Data1.Recordset.Fields(2) = Text3.Text
Data1.Recordset.Fields(3) = Text4.Text
Data1.Recordset.Fields(4) = Text5.Text
Data1.Recordset.Fields(5) = Text6.Text
Data1.Recordset.Update
MsgBox "Customers-Counselled"

End Sub

Private Sub Command2_Click()


Me.Hide
Form5.Show
End Sub

Private Sub Command3_Click()


Me.Hide
MDIForm1.Show

End Sub

Private Sub Form_Load()


Text4.Text = Now
End Sub

49
Customer registration

50
Coding
Private Sub Combo2_Click()
Combo3.Clear
Data2.Recordset.MoveFirst
Do Until Data2.Recordset.EOF
If (Combo2.Text = (Data2.Recordset.Fields(2).Value)) Then
Combo3.AddItem (Data2.Recordset.Fields(1).Value)
End If
Data2.Recordset.MoveNext
Loop
End Sub
Private Sub Combo3_Click()
Data2.Recordset.MoveFirst
Do Until Data2.Recordset.EOF
If (Combo3.Text = (Data2.Recordset.Fields(1).Value)) Then
Text18.Text = (Data2.Recordset.Fields(3).Value)
Text24.Text = (Data2.Recordset.Fields(4).Value)
Text28.Text = (Data2.Recordset.Fields(5).Value)
End If
Data2.Recordset.MoveNext
Loop
End Sub

Private Sub Combo4_Click()


s = Year(Date) + 1
s3 = Year(Date) + Val(Combo4.Text)
s1 = Day(Date)
s2 = Month(Date)
If (Val(Combo4.Text) < Val(Text18.Text)) Then
MsgBox "Not-Possible"
ElseIf Val(Combo4.Text) = Val(Text18.Text) Then
Text21.Text = Text24.Text
Text22.Text = Val(Combo4.Text) / Val(Text18.Text)
Text23.Text = s1 & "/" & s2 & "/" & s - 1
Text25.Text = s1 & "/" & s2 & "/" & s3
Text26.Text = Text24.Text
Text27.Text = (Val(Text21.Text) * (Val(Text28.Text) / 100))
Else
Text22.Text = Val(Combo4.Text) / Val(Text18.Text)
Text21.Text = Val(Text22.Text) * Text24.Text
Text23.Text = s1 & "/" & s2 & "/" & s
Text25.Text = s1 & "/" & s2 & "/" & s3
Text26.Text = Text24.Text
Text27.Text = (Val(Text21.Text) * (Val(Text28.Text) / 100))
End If
End Sub

Private Sub Command1_Click()

51
Data1.Recordset.AddNew
Data1.Recordset.Fields(0) = Text1.Text
Data1.Recordset.Fields(1) = Text2.Text
Data1.Recordset.Fields(2) = Text3.Text
Data1.Recordset.Fields(3) = Text4.Text
Data1.Recordset.Fields(4) = Text5.Text
Data1.Recordset.Fields(5) = Text6.Text
Data1.Recordset.Fields(6) = Text7.Text
Data1.Recordset.Fields(7) = Text8.Text
Data1.Recordset.Fields(8) = Text9.Text
Data1.Recordset.Fields(9) = Text10.Text
Data1.Recordset.Fields(10) = Text11.Text
Data1.Recordset.Fields(11) = Text12.Text
Data1.Recordset.Fields(12) = Text13.Text
Data1.Recordset.Fields(13) = Text14.Text
Data1.Recordset.Fields(14) = Text15.Text
Data1.Recordset.Update
'data2=register
Data3.Recordset.AddNew
Data3.Recordset.Fields(0) = Text16.Text
Data3.Recordset.Fields(1) = Text17.Text
Data3.Recordset.Fields(2) = Combo1.Text
Data3.Recordset.Fields(3) = Text1.Text
Data3.Recordset.Fields(4) = Text15.Text
Data3.Recordset.Update
'data4-register
Data4.Recordset.AddNew
Data4.Recordset.Fields(0) = Text1.Text
Data4.Recordset.Fields(1) = Text2.Text
Data4.Recordset.Fields(2) = Text6.Text
Data4.Recordset.Fields(3) = Text16.Text
Data4.Recordset.Fields(4) = Text20.Text
Data4.Recordset.Fields(5) = Text19.Text
Data4.Recordset.Fields(6) = Combo2.Text
Data4.Recordset.Fields(7) = Combo3.Text
Data4.Recordset.Fields(8) = Combo4.Text
Data4.Recordset.Fields(9) = Text23.Text
Data4.Recordset.Fields(10) = Text15.Text
Data4.Recordset.Update
'data5
Data5.Recordset.AddNew
Data5.Recordset.Fields(0) = Text1.Text
Data5.Recordset.Fields(1) = Text15.Text
Data5.Recordset.Fields(2) = Combo2.Text
Data5.Recordset.Fields(3) = Combo3.Text
Data5.Recordset.Fields(4) = Text6.Text
Data5.Recordset.Fields(5) = Text23.Text
Data5.Recordset.Fields(6) = Text21.Text
Data5.Recordset.Fields(7) = Text22.Text
Data5.Recordset.Fields(8) = Text25.Text

52
Data5.Recordset.Fields(9) = Text27.Text
Data5.Recordset.Fields(10) = Text26.Text
Data5.Recordset.Fields(11) = Text19.Text
Data5.Recordset.Fields(12) = Val(Text21.Text) + Val(Text27.Text)
Data5.Recordset.Update

Data6.Recordset.AddNew
Data6.Recordset.Fields(0) = Text1.Text
Data6.Recordset.Fields(1) = Text6.Text
Data6.Recordset.Fields(2) = Combo2.Text
Data6.Recordset.Fields(3) = Combo3.Text
Data6.Recordset.Fields(4) = Text20.Text
Data6.Recordset.Fields(5) = Val(Text21.Text) - Val(Text24.Text)
Data6.Recordset.Fields(6) = Val(Text22.Text) - 1
Data6.Recordset.Fields(7) = Text23.Text
Data6.Recordset.Fields(8) = Text15.Text
Data6.Recordset.Fields(9) = Text26.Text
Data6.Recordset.Fields(10) = Text19.Text
Data6.Recordset.Update
MsgBox "Record-Registered"
End Sub

Private Sub Command2_Click()


Me.Hide
MDIForm1.Show
End Sub

Private Sub Command3_Click()


Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13.Text = ""
Text14.Text = ""
Text15.Text = ""
Text16.Text = ""
Text17.Text = ""
Text18.Text = ""
Text19.Text = ""
Text20.Text = ""
Text21.Text = ""
Text22.Text = ""

53
Text23.Text = ""
Text24.Text = ""
Text25.Text = ""
Text26.Text = ""
Text27.Text = ""

End Sub

Private Sub Form_Activate()


Data2.Recordset.MoveFirst
Do Until Data2.Recordset.EOF
Combo2.AddItem (Data2.Recordset.Fields(2).Value)
Data2.Recordset.MoveNext
Loop
Combo1.AddItem ("Father")
Combo1.AddItem ("Mother")
Combo1.AddItem ("Brother")
Combo1.AddItem ("Sister")
Combo1.AddItem ("Daughter")
Combo1.AddItem ("Son")
Combo1.AddItem ("Grand-Son")
Combo1.AddItem ("Grand-Daughter")
Combo1.AddItem ("Husband")
Combo1.AddItem ("Wife")
Combo1.AddItem ("Friend")

Data1.Refresh
Data1.Recordset.MoveFirst
Do Until Data1.Recordset.EOF
If (Data1.Recordset.EOF) Then
Text15 = Data1.Recordset.Fields(14).Value + 1
End If
Text15 = Data1.Recordset.Fields(14).Value + 1

Data1.Recordset.MoveNext
Loop
Data4.Refresh
Data4.Recordset.MoveFirst
Do Until Data4.Recordset.EOF
If (Data4.Recordset.EOF) Then
Text19 = Data4.Recordset.Fields(5).Value + 1
End If
Text19 = Data4.Recordset.Fields(5).Value + 1

Data4.Recordset.MoveNext
Loop
End Sub

Private Sub Text18_Change()


Combo4.Clear

54
If (Val(Text18.Text) Mod 10 = 0) Then
For i = 0 To 50 Step 10
Combo4.AddItem (i)
Next i
Else
For i = 0 To 50 Step 5
Combo4.AddItem (i)
Next i
End If
End Sub

55
Insurance plan

56
Coding
Private Sub Command1_Click()
Data1.Recordset.AddNew
Data1.Recordset.Fields(0) = Text1.Text
Data1.Recordset.Fields(1) = Text2.Text
Data1.Recordset.Fields(2) = Text3.Text
Data1.Recordset.Fields(3) = Combo1.Text
Data1.Recordset.Fields(4) = Text4.Text
Data1.Recordset.Fields(5) = Text5.Text
Data1.Recordset.Update
MsgBox ("Policy Updated")
End Sub

Private Sub Command2_Click()


Text1.Text = ""
Text2 = ""
Text3 = ""
Text4 = ""

End Sub

Private Sub Command3_Click()


Me.Hide
MDIForm1.Show
End Sub

Private Sub Form_Activate()


Data1.Refresh
Data1.Recordset.MoveFirst
Do Until Data1.Recordset.EOF
If (Data1.Recordset.EOF) Then
Text1 = Data1.Recordset.Fields(0).Value + 1
End If
Text1 = Data1.Recordset.Fields(0).Value + 1

Data1.Recordset.MoveNext

Loop
End Sub

Private Sub Form_Load()


For i = 0 To 50 Step 5
Combo1.AddItem (i)
Next i
Text1.Text = ""
Text2 = ""
Text3 = ""
Text4 = ""
End Sub

57
New user

58
Coding
Private Sub Command1_Click()
Data1.Recordset.AddNew
Data1.Recordset.Fields(0) = Text1.Text
Data1.Recordset.Fields(1) = Text2.Text
Data1.Recordset.Fields(2) = Text3.Text
Data1.Recordset.Update
MsgBox "User-Id updated"
End Sub

Private Sub Command2_Click()


Me.Hide
MDIForm1.Show
End Sub

Private Sub Form_Load()


s = InputBox("Enter the userid")
If (s = admin) Then
Me.Show
Else
Me.Hide
End If
Text1 = ""
Text2 = ""
Text3 = ""

End Sub

59
Insurance policies

60
Coding
Private Sub Command1_Click()
Me.Hide
MDIForm1.Show
End Sub

61
Customer details

62
Coding
Private Sub Command1_Click()
Me.Hide
MDIForm1.Show
End Sub

63
Enquiries customer

64
Coding
Private Sub Command1_Click()
Form1.Show

End Sub

Private Sub Command2_Click()


Me.Hide
MDIForm1.Show
End Sub

Private Sub Form_Activate()


Data1.Refresh
End Sub

65
Payment detail

66
Coding
Private Sub Command1_Click()
Me.Hide
MDIForm1.Show
End Sub

67
Nominees report

68
Coding
Private Sub Command1_Click()
Me.Hide
MDIForm1.Show
End Sub

69
Receipt instalment

70
Coding
Private Sub Combo1_Click()
Data2.Refresh
Data2.Recordset.MoveFirst
Do Until Data2.Recordset.EOF
If (Data2.Recordset.EOF) Then
Text16 = Data2.Recordset.Fields(10).Value + 1
End If
Text16 = Data2.Recordset.Fields(10).Value + 1

Data2.Recordset.MoveNext
Loop
Data2.Refresh
Data2.Recordset.MoveFirst
Do Until Data2.Recordset.EOF
If Combo1.Text = Data2.Recordset.Fields(8).Value Then
Text3.Text = Data2.Recordset.Fields(0).Value
Text4.Text = Data2.Recordset.Fields(1).Value
Text19.Text = Data2.Recordset.Fields(2).Value
Text1.Text = Data2.Recordset.Fields(3).Value
Text17.Text = Data2.Recordset.Fields(4).Value
Text5.Text = Data2.Recordset.Fields(9).Value
Text2.Text = Data2.Recordset.Fields(6).Value
Text15.Text = Data2.Recordset.Fields(7).Value
GoTo ends
Else
Data2.Recordset.MoveNext
End If
Loop
ends:
If (Text2.Text = 0) Then
Command2.Enabled = False
Command3.Enabled = False
End If
Data2.Recordset.Close

End Sub

Private Sub Command1_Click()


MsgBox "Under construction"
'Me.PrintForm
End Sub

Private Sub Command2_Click()


If (Text2.Text > 0) Then
Data2.Refresh
Data2.Recordset.MoveFirst
Do Until Data2.Recordset.EOF
If Combo1.Text = Data2.Recordset.Fields(8).Value Then

71
s = Year(Text15.Text) + 1
s1 = Day(Text15)
s2 = Month(Text15)
Text15.Text = s1 & "/" & s2 & "/" & s
a1 = Data2.Recordset.Fields(5).Value
a = Data2.Recordset.Fields(9).Value
Text5.Text = a1 - a
'MsgBox Data2.Recordset.Fields(5).Value - Val(Text5.Text)
Text2.Text = Text2.Text - 1
GoTo ends
Else
Data2.Recordset.MoveNext
End If
Loop
ends:
Data2.Recordset.Close
End If
End Sub

Private Sub Command3_Click()


Data2.Refresh

Do Until Data2.Recordset.EOF
If Combo1.Text = Data2.Recordset.Fields(8).Value Then
Data2.Recordset.Edit
Data2.Recordset.Fields(0) = Text3.Text
Data2.Recordset.Fields(1) = Text4.Text
Data2.Recordset.Fields(2) = Text19.Text
Data2.Recordset.Fields(3) = Text1.Text
Data2.Recordset.Fields(4) = Text17.Text
Data2.Recordset.Fields(5) = Text5.Text
Data2.Recordset.Fields(6) = Text2.Text
Data2.Recordset.Fields(7) = Text15.Text
Data2.Recordset.Fields(8) = Text16.Text
Data2.Recordset.Update
MsgBox "Payment Accepted"
GoTo ends
End If
Data2.Recordset.MoveNext
Loop

ends:

End Sub

Private Sub Command4_Click()


Text3 = ""
Text4 = ""
Text5 = ""

72
Text19 = ""
Text2 = ""
Text17 = ""
Text1 = ""
Text15 = ""
Text16 = ""
End Sub

Private Sub Command5_Click()


Me.Hide
MDIForm1.Show
End Sub

Private Sub Data1_Validate(Action As Integer, Save As Integer)

End Sub

Private Sub Form_Activate()


Combo1.Clear
Data2.Recordset.MoveFirst
Do Until Data2.Recordset.EOF
Combo1.AddItem (Data2.Recordset.Fields(8).Value)
Data2.Recordset.MoveNext
Loop
Data2.Refresh
Data2.Recordset.MoveFirst
Do Until Data2.Recordset.EOF
If (Data2.Recordset.EOF) Then
Text16 = Data2.Recordset.Fields(10).Value + 1
End If
Text16 = Data2.Recordset.Fields(10).Value + 1

Data2.Recordset.MoveNext
Loop
End Sub

73
Bond details

74
Coding
Private Sub Combo1_Click()
Data1.Recordset.MoveFirst
Do Until Data1.Recordset.EOF
If Combo1.Text = Data1.Recordset.Fields(1) Then
Text1.Text = Data1.Recordset.Fields(0)
Text2.Text = Data1.Recordset.Fields(4)
Text3.Text = Data1.Recordset.Fields(2)
Text4.Text = Data1.Recordset.Fields(3)
Text6.Text = Data1.Recordset.Fields(11)
Text9.Text = Data1.Recordset.Fields(6)
Text10.Text = Data1.Recordset.Fields(7)
Text12.Text = Data1.Recordset.Fields(8)
Text13.Text = Data1.Recordset.Fields(9)
GoTo ends
Else
If Data1.Recordset.EOF Then
MsgBox "No Records"
End If
End If
Data1.Recordset.MoveNext
Loop
ends:

End Sub

Private Sub Command1_Click()


Data2.Recordset.AddNew
Data2.Recordset.Fields(0) = Text1.Text
Data2.Recordset.Fields(1) = Text2.Text
Data2.Recordset.Fields(2) = Text3.Text
Data2.Recordset.Fields(3) = Text4.Text
Data2.Recordset.Fields(4) = Text6.Text
Data2.Recordset.Fields(5) = Text9.Text
Data2.Recordset.Fields(6) = Text10.Text
Data2.Recordset.Fields(7) = Text12.Text
Data2.Recordset.Fields(8) = Text13.Text
Data2.Recordset.Update
End Sub

Private Sub Command2_Click()


MsgBox "UNDER CONSTRUCTION"

End Sub

Private Sub Command3_Click()


Me.Hide
MDIForm1.Show
End Sub

75
Private Sub Form_Activate()
Data1.Recordset.MoveFirst
Do Until Data1.Recordset.EOF
Combo1.AddItem (Data1.Recordset.Fields(1).Value)
Data1.Recordset.MoveNext
Loop
End Sub

76
Premium calculation

77
Coding
Private Sub Combo2_Click()
Combo3.Clear
Data2.Recordset.MoveFirst
Do Until Data2.Recordset.EOF
If (Combo2.Text = (Data2.Recordset.Fields(2).Value)) Then
Combo3.AddItem (Data2.Recordset.Fields(1).Value)
End If
Data2.Recordset.MoveNext
Loop
End Sub

Private Sub Combo3_Click()


Data2.Recordset.MoveFirst
Do Until Data2.Recordset.EOF
If (Combo3.Text = (Data2.Recordset.Fields(1).Value)) Then
Text18.Text = (Data2.Recordset.Fields(3).Value)
Text24.Text = (Data2.Recordset.Fields(4).Value)
Text1.Text = (Data2.Recordset.Fields(5).Value)
End If
Data2.Recordset.MoveNext
Loop
If (Text18.Text Mod 10 = 0) Then
For i = 0 To 50 Step 10
Combo4.AddItem (i)
Next i
Else
For i = 0 To 50 Step 5
Combo4.AddItem (i)
Next i
End If
End Sub

Private Sub Combo4_Click()


s = Year(Date) + 1
s3 = Year(Date) + Combo4.Text
s1 = Day(Date)
s2 = Month(Date)
If (Val(Combo4.Text) < Val(Text18.Text)) Then
MsgBox "Not-Possible"
ElseIf Val(Combo4.Text) = Val(Text18.Text) Then
Text21.Text = Text24.Text
Text22.Text = Val(Combo4.Text) / Val(Text18.Text)
' Text23.Text = s1 & "/" & s2 & "/" & s - 1
Text25.Text = s1 & "/" & s2 & "/" & s3
Text26.Text = Text24.Text
Text27.Text = (Val(Text21.Text) * (Val(Text1.Text) / 100))
Else

78
Text22.Text = Val(Combo4.Text) / Val(Text18.Text)
Text21.Text = Val(Text22.Text) * Text24.Text
' Text23.Text = s1 & "/" & s2 & "/" & s
Text25.Text = s1 & "/" & s2 & "/" & s3
Text26.Text = Text24.Text
Text27.Text = (Val(Text21.Text) * (Val(Text1.Text) / 100))
End If
End Sub

Private Sub Command1_Click()


Me.Hide
MDIForm1.Show
End Sub

Private Sub Form_Activate()

Data2.Recordset.MoveFirst
Do Until Data2.Recordset.EOF
Combo2.AddItem (Data2.Recordset.Fields(2).Value)
Data2.Recordset.MoveNext
Loop

End Sub

79
Application

80
Coding
Private Sub Command1_Click()
Me.Hide
MDIForm1.Show
End Sub

81
About insurance

82
Coding
Option Explicit

' Reg Key Security Options...


Const READ_CONTROL = &H20000
Const KEY_QUERY_VALUE = &H1
Const KEY_SET_VALUE = &H2
Const KEY_CREATE_SUB_KEY = &H4
Const KEY_ENUMERATE_SUB_KEYS = &H8
Const KEY_NOTIFY = &H10
Const KEY_CREATE_LINK = &H20
Const KEY_ALL_ACCESS = KEY_QUERY_VALUE + KEY_SET_VALUE + _
KEY_CREATE_SUB_KEY + KEY_ENUMERATE_SUB_KEYS + _
KEY_NOTIFY + KEY_CREATE_LINK + READ_CONTROL

' Reg Key ROOT Types...


Const HKEY_LOCAL_MACHINE = &H80000002
Const ERROR_SUCCESS = 0
Const REG_SZ = 1 ' Unicode nul terminated string
Const REG_DWORD = 4 ' 32-bit number

Const gREGKEYSYSINFOLOC = "SOFTWARE\Microsoft\Shared Tools Location"


Const gREGVALSYSINFOLOC = "MSINFO"
Const gREGKEYSYSINFO = "SOFTWARE\Microsoft\Shared Tools\MSINFO"
Const gREGVALSYSINFO = "PATH"

Private Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" (ByVal hKey As
Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, ByRef
phkResult As Long) As Long
Private Declare Function RegQueryValueEx Lib "advapi32" Alias "RegQueryValueExA" (ByVal hKey
As Long, ByVal lpValueName As String, ByVal lpReserved As Long, ByRef lpType As Long, ByVal
lpData As String, ByRef lpcbData As Long) As Long
Private Declare Function RegCloseKey Lib "advapi32" (ByVal hKey As Long) As Long

Private Sub cmdSysInfo_Click()


Call StartSysInfo
End Sub

Private Sub cmdOK_Click()


Unload Me
End Sub

Private Sub Form_Load()


Me.Caption = "About " & app.Title
lblVersion.Caption = "Version " & app.Major & "." & app.Minor & "." & app.Revision
lblTitle.Caption = app.Title
End Sub

83
Public Sub StartSysInfo()
On Error GoTo SysInfoErr

Dim rc As Long
Dim SysInfoPath As String

' Try To Get System Info Program Path\Name From Registry...


If GetKeyValue(HKEY_LOCAL_MACHINE, gREGKEYSYSINFO, gREGVALSYSINFO,
SysInfoPath) Then
' Try To Get System Info Program Path Only From Registry...
ElseIf GetKeyValue(HKEY_LOCAL_MACHINE, gREGKEYSYSINFOLOC,
gREGVALSYSINFOLOC, SysInfoPath) Then
' Validate Existance Of Known 32 Bit File Version
If (Dir(SysInfoPath & "\MSINFO32.EXE") <> "") Then
SysInfoPath = SysInfoPath & "\MSINFO32.EXE"

' Error - File Can Not Be Found...


Else
GoTo SysInfoErr
End If
' Error - Registry Entry Can Not Be Found...
Else
GoTo SysInfoErr
End If

Call Shell(SysInfoPath, vbNormalFocus)

Exit Sub
SysInfoErr:
MsgBox "System Information Is Unavailable At This Time", vbOKOnly
End Sub

Public Function GetKeyValue(KeyRoot As Long, KeyName As String, SubKeyRef As String, ByRef


KeyVal As String) As Boolean
Dim i As Long ' Loop Counter
Dim rc As Long ' Return Code
Dim hKey As Long ' Handle To An Open Registry Key
Dim hDepth As Long '
Dim KeyValType As Long ' Data Type Of A Registry Key
Dim tmpVal As String ' Tempory Storage For A Registry Key Value
Dim KeyValSize As Long ' Size Of Registry Key Variable
'------------------------------------------------------------
' Open RegKey Under KeyRoot {HKEY_LOCAL_MACHINE...}
'------------------------------------------------------------
rc = RegOpenKeyEx(KeyRoot, KeyName, 0, KEY_ALL_ACCESS, hKey) ' Open Registry Key

If (rc <> ERROR_SUCCESS) Then GoTo GetKeyError ' Handle Error...

tmpVal = String$(1024, 0) ' Allocate Variable Space


KeyValSize = 1024 ' Mark Variable Size

84
'------------------------------------------------------------
' Retrieve Registry Key Value...
'------------------------------------------------------------
rc = RegQueryValueEx(hKey, SubKeyRef, 0, _
KeyValType, tmpVal, KeyValSize) ' Get/Create Key Value

If (rc <> ERROR_SUCCESS) Then GoTo GetKeyError ' Handle Errors

If (Asc(Mid(tmpVal, KeyValSize, 1)) = 0) Then ' Win95 Adds Null Terminated String...
tmpVal = Left(tmpVal, KeyValSize - 1) ' Null Found, Extract From String
Else ' WinNT Does NOT Null Terminate String...
tmpVal = Left(tmpVal, KeyValSize) ' Null Not Found, Extract String Only
End If
'------------------------------------------------------------
' Determine Key Value Type For Conversion...
'------------------------------------------------------------
Select Case KeyValType ' Search Data Types...
Case REG_SZ ' String Registry Key Data Type
KeyVal = tmpVal ' Copy String Value
Case REG_DWORD ' Double Word Registry Key Data Type
For i = Len(tmpVal) To 1 Step -1 ' Convert Each Bit
KeyVal = KeyVal + Hex(Asc(Mid(tmpVal, i, 1))) ' Build Value Char. By Char.
Next
KeyVal = Format$("&h" + KeyVal) ' Convert Double Word To String
End Select

GetKeyValue = True ' Return Success


rc = RegCloseKey(hKey) ' Close Registry Key
Exit Function ' Exit

GetKeyError: ' Cleanup After An Error Has Occured...


KeyVal = "" ' Set Return Val To Empty String
GetKeyValue = False ' Return Failure
rc = RegCloseKey(hKey) ' Close Registry Key
End Function

85
Online form

86
Coding
Option Explicit

Public StartingAddress As String


Dim mbDontNavigateNow As Boolean

Private Sub Form_Activate()


brwWebBrowser.Navigate cboAddress.Text
End Sub

Private Sub Form_Load()


On Error Resume Next
Me.Show
tbToolBar.Refresh
Form_Resize

cboAddress.Move 50, lblAddress.Top + lblAddress.Height + 15

If Len(StartingAddress) > 0 Then


cboAddress.Text = StartingAddress
cboAddress.AddItem cboAddress.Text
'try to navigate to the starting address
timTimer.Enabled = True
brwWebBrowser.Navigate StartingAddress
End If

End Sub

Private Sub brwWebBrowser_DownloadComplete()


On Error Resume Next
Me.Caption = brwWebBrowser.LocationName
End Sub

Private Sub brwWebBrowser_NavigateComplete(ByVal URL As String)


Dim i As Integer
Dim bFound As Boolean
Me.Caption = brwWebBrowser.LocationName
For i = 0 To cboAddress.ListCount - 1
If cboAddress.List(i) = brwWebBrowser.LocationURL Then
bFound = True
Exit For
End If
Next i
mbDontNavigateNow = True
If bFound Then
cboAddress.RemoveItem i

87
End If
cboAddress.AddItem brwWebBrowser.LocationURL, 0
cboAddress.ListIndex = 0
mbDontNavigateNow = False
End Sub
Private Sub cboAddress_Click()
If mbDontNavigateNow Then Exit Sub
timTimer.Enabled = True
brwWebBrowser.Navigate cboAddress.Text
End Sub
Private Sub cboAddress_KeyPress(KeyAscii As Integer)
On Error Resume Next
If KeyAscii = vbKeyReturn Then
cboAddress_Click
End If
End Sub
Private Sub Form_Resize()
cboAddress.Width = Me.ScaleWidth - 100
brwWebBrowser.Width = Me.ScaleWidth - 100
brwWebBrowser.Height = Me.ScaleHeight - (picAddress.Top + picAddress.Height) - 100
End Sub
Private Sub timTimer_Timer()
If brwWebBrowser.Busy = False Then
timTimer.Enabled = False
Me.Caption = brwWebBrowser.LocationName
Else
Me.Caption = "Working..."
End If
End Sub
Private Sub tbToolBar_ButtonClick(ByVal Button As Button)
On Error Resume Next
timTimer.Enabled = True
Select Case Button.Key
Case "Back"
brwWebBrowser.GoBack
Case "Forward"
brwWebBrowser.GoForward
Case "Refresh"
brwWebBrowser.Refresh
Case "Home"
brwWebBrowser.GoHome
Case "Search"
brwWebBrowser.GoSearch
Case "Stop"
timTimer.Enabled = False
brwWebBrowser.Stop
Me.Caption = brwWebBrowser.LocationName
End Select

End Sub

88
BIBLIOGRAPHY
WEBSITES

WWW.GOOGLE.COM

BOOKS

COMPUTER APPLICATION II
BY ANURADHA AGGARWAL

FUNDAMENTALS TO COMPUTERS

89

Das könnte Ihnen auch gefallen