VB6: Class modules (what are they???)

I know what modules are used 4, but I don't have a clue what class modules are. Can someone please explain them?


  • Alrighty, you can use Class Modules as like a library of Sub Functions. Inorder to use one, I'll give an example from this game I'm making:

    modDATA ([B]Module[/B])

    [blue]Global[/blue] [black]Run[/black] [blue]As New[/blue] clsRun

    clsRun ([B]Class Module[/B])

    [blue]Public Function[/blue] GenerateHostList()
    [blue]End Sub[/blue]

    And to access the sub function [b]GenerateHostList[/b], all you would need to do is type in [b]Run.GenerateHostList[/b] as a line of code.
    Hope that helps as an explanation.

    ..:: Zantos ::..

  • Class modules are classes implemented in VB. It's OOP(object-oriented programming). Read about OOP on the Web and then write such questions.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!