Howdy, Stranger!

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

Categories

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?
Thanks!
[b][red]Dragon[/red][purple]storM[/purple][/b]

Comments

  • ZantosZantos Member Posts: 139
    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()
    [green]'Code[/green]
    [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 ::..


  • nimnul2nimnul2 Member Posts: 131
    Class modules are classes implemented in VB. It's OOP(object-oriented programming). Read about OOP on the Web and then write such questions.
  • Justin BibJustin Bib USAMember Posts: 0

    __ [ http://forcoder.org ] free ebooks and video tutorials about ( C++ Python Delphi PL/SQL Swift Visual Basic .NET R Assembly Perl PHP Java Ruby MATLAB Scratch JavaScript Go Visual Basic C C# Objective-C SAS Crystal Lua Apex Julia Hack Awk VBScript Clojure Kotlin FoxPro Erlang Transact-SQL Rust Ada Bash COBOL Fortran Lisp D Prolog Dart Scheme Alice LabVIEW Scala F# ABAP ML Logo ) _________

Sign In or Register to comment.