DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Visual Basic 4 / 5 / 6 (http://www.daniweb.com/forums/forum4.html)
-   -   USING CLASSES in VB6 (http://www.daniweb.com/forums/thread24074.html)

vhinehds Jun 12th, 2005 3:07 am
Re: USING CLASSES in VB6
 
Quote:

Originally Posted by Comatose
:) Thanx, I have my moments...


hi guys!

well until now i cant still figure out how to make classes...
can you give me a basic example of creating a class and how can i use it in my coding? thanks a lot.

jwshepherd Jun 16th, 2005 1:00 am
Re: USING CLASSES in VB6
 
check the code snippets to the left there isone in there

Bharati Krishna Jun 16th, 2005 3:45 am
Re: USING CLASSES in VB6
 
Hi,

If you want to develop a complete Database Application using classes, I would advise you to refer this book Titled:" Develop an Accounting package using vb and SQL server 2000".

You can build a class to access data (through methods) from SQL server, update data, Managing Connection and any business logic you want build in client side.....

I read this book and developed full accounting Client/server package.

Regards
bhar

Comatose Jun 16th, 2005 7:31 pm
Re: USING CLASSES in VB6
 
Or, Just a simple google search on vb6 class module example turns up quite a bit of good stuff. If you need, I can build one as an example, but there are tons of them out there with a google search.

vhinehds Jun 21st, 2005 7:14 am
Re: USING CLASSES in VB6
 
hi comatose sorry its only now i checked my port here...anyway, i would love you'll give me a simple example together with an explanations. because i just find it hard to build my own class, i have difficulty in understanding the procedure of making it.

thanks a lot.

detnikolaids Jul 8th, 2005 3:52 am
Re: USING CLASSES in VB6
 
Hi guys! I'm a newbie here =)
question related to this thread. a module can also be created and re-used across different VB projects. So when is it appropriate to use a class rather than a module?

Bharati Krishna Jul 30th, 2006 6:33 am
Re: USING CLASSES in VB6
 
Hi,

When we want to reuse a functionality, Classes can be used. A module for instance, could be used for a particular form only.

In an accounting application a Class can be used in the following instances:

a.When we want to access data from a database
b.Log in feature in the application
c.Adding data

In the title "Develop an Accounting Package using VB", i have dealt with this topic in detail....A class has been developed and when we save data into the database, retreive, edit, adding and displaying data. All the financial transactions use the Class - Tran Class.

If you notice, suppose we have a Cash Payment transaction, this transction uses the same class as the Cash Voucher transaction uses. I have dealt with how to design single form, and use the same form for different transactions like CV, CP etc, which is OOPs.

If we use a module, we will need to create separate modules .....

Each entity also can be created as a class.

Class based design forces us to think ahead in terms system design and implenting the requirements in a project and thus save on all resources like time, money etc.

Regards
Bhar


All times are GMT -4. The time now is 2:33 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC