![]() |
| ||
| Help on Creating Class in VB6 Hello. Could someone help me on how to create classes in VB6? I need to create a class that would enable me to add 2 numbers then show the sum... simple enough? but im having a hard time looking for tutes out there. I could easily learn with some examples... A walkthrough would be greatly appreciated. Links will also be a great help. Thanks in advance! |
| ||
| Re: Help on Creating Class in VB6 1 Attachment(s) See the Attached file. Study the code and read the comments and it will walk you through creating a class |
| ||
| Re: Help on Creating Class in VB6 Quote:
Here are some more clarifications(if that's what it should be called) or inquiry: Do i always have to put my classes in a class module? Or can i have declare classes in a module? my prof. told me u can declare a class (vb6) in a module... i had show him a program i made which was like the one you gave me but he told me to make a class in a module... Heres my program: frmMain.frm has 3 textboxes(txtrate, txtHours, txtPay) and a command button (cmdCompute) Public gf_MyPay As New CCompPay and my class module: CCompPay.cls Private m_NoHours As Integer Is this correct? i does work but my professor told me it was not a class... im a bit confused about it. its the only way i know how to create a class in VB6. any enlightment about this? Thanks again |
| ||
| Re: Help on Creating Class in VB6 Ahh, Ok... OK what he is saying to do is add module.bas Decalere your code a s a function... So when you goto command_button1 you can say fucntion1() and it will run the code. Reason being is that now you can call function1() throughtout your entire project. So you take that code turn it into a function and stick it in a module. Well in this case I am saying function but yo ucan make a class this way as well... The genral idea your prof is saying is to be able to ref class or fucntion throughout the entire project through a single module |
| ||
| Re: Help on Creating Class in VB6 http://www.officecomputertraining.co...ges/page42.asp is a pretty good tutorial about classes in VB. Hopefully it will help some. |
| ||
| Re: Help on Creating Class in VB6 Quote:
hi, this helped me a lot to understand class structure for vb6. Thanks. Mahavir Shah |
| ||
| Class module Pls can you tell me what is class module how does it works and any references also about connecting oracle SQL plus and VB6 as i hve connected VB with SQl but when i insert any data in SQL in VB the data doesnt gets updated (i have used ADODC for connecting) Pls help me out im having a project on this... |
| ||
| sbs_1993, please do not "hijack" someone elses post. Start your own post in the forum, and we will try and help where we can. To answer your question on the steps needed, herewith - Quote:
|
| All times are GMT -4. The time now is 6:11 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC