Results 1 to 9 of 9

Thread: object based??

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    18

    object based??

    hi.
    i m very new to vb...can any tell me vb is object based or object oriented language??

    thanx

  2. #2

  3. #3
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,957

    Re: object based??

    Sort of yes but not really. The vb editor has the capacity to structure your code into objects but they're basically identical to modules in their implementation. There are a load of important object orientated concepts that vb6 doesn't support such as inheritance, method overloading, parametised constructors etc.

    If you're looking for an object orientated language to learn OO I'd recommend Java or C++ if you're feeling particularly masochistic. And always remember, Object Orientation is a design paradigm, not an implementation structure; all you relly want from a language is the ability to support the concepts thrown up by your design.

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    18

    Re: object based??

    thanks for immediate response........how we can say it is pure oop..bcoz it uses built in object to create new object...still i m confused......

    thanx to both........

  5. #5
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: object based??

    Pure OOP? In what context?

    VB6 does not do inheritance (although this can be fudged) or overloaded events.
    Inheritance is a huge thing for OOP, and very handy.

    In VB6 you can create 2 objects, a users and user class. Where Users is a collection of User classes. In VB6 you can do:
    VB Code:
    1. Dim objUsers As Users
    2.  
    3.    Set objUsers = New Users
    4.    objUsers.Fetch
    Once you have loaded the users class you can do things like:
    VB Code:
    1. Dim objUser As User
    2.  
    3.    objUser = objUsers.Item(6)
    4.    MsgBox objUser.Username
    5.  
    6. 'or
    7.  
    8.    MsgBox objUsers.Item(6).Username
    9.  
    10. 'or
    11.  
    12. Dim objUser As User
    13.  
    14.     For Each objUser In objUsers
    15.         'do something with each user class
    16.     Next objUser

    Hope that helps.

    Why do you ask?

    Woka

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    18

    Re: object based??

    thanx wokawidget......for ur detail explaination...
    last conclusion vb is oop but not pure oop....

    thanx

  7. #7

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    18

    Re: object based??

    thanx a lot....below is some more question..sorry for asking in same thread only..
    1)...how many modules are in vb??
    2)what are difference between activedll and activeexe??

    thanx

  9. #9
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: object based??

    1) I think it's as many as you want...never reached the limit, even on HUGE enterprise apps.

    2) ActiveX EXE can run in a different process and thread execution. ActiveX DLLs are DLL files, reference files. ActiveX EXE's can be run as a normal EXE or referenced like DLLs. Code inside ActiveX EXE's runs slower than DLLs.

    Woka

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width