Results 1 to 5 of 5

Thread: Object oriented functions in Visual Basic 6.0

  1. #1
    Join Date
    Dec 2010
    Posts
    20

    Object oriented functions in Visual Basic 6.0

    Hello friends, I wanted to know what Object oriented functions in Visual Basic 6.0 are. Is it supportable in Visual basic 6.0 or not? I think that it is available but I am not sure whether all functions are available in Visual basic 6.0 or not. I am very much confused with some of the terms of object oriented programming. Will it affect in visual basic 6.0 or what? If anyone having any information then please let me know as soon as possible.

  2. #2
    Join Date
    May 2009
    Posts
    637

    Re: Object oriented functions in Visual Basic 6.0

    Combining the characteristics which is properties and behavior which is methods of an object into a single package is known as Encapsulation. Encapsulation is also called data hiding because the object can hide its data and procedures using the Private keyword. The data and procedures to be exposed can be defined using the Public keyword. You can change the values of the properties of an object or execute its methods, but you cannot change or add new properties and methods.

  3. #3
    Join Date
    Apr 2009
    Posts
    569

    Re: Object oriented functions in Visual Basic 6.0

    For example, you can set or retrieve the properties of a command button such as Caption or Width, you can execute its methods such as Move and SetFocus and you can write code for its different events such as Click event and DblClick event, but you cannot add new properties and methods. Polymorphism is the ability to take more than one form. In Visual Basic, polymorphism is giving same names to the methods of different objects. In standard OOP, polymorphism is giving same names to different methods of the same object

  4. #4
    Join Date
    May 2009
    Posts
    529

    Re: Object oriented functions in Visual Basic 6.0

    For example, the objects such as Printer, Form, PictureBox and Debug all have a method named Print. Although the names are same, the methods of different objects act differently. The Print method of an object sends the output to that object. You can implement polymorphism in VB by using standard naming conventions so that the action can be recognized by its name. For example, don't use Clear for one class, Blankout for another, and Empty for another.

  5. #5
    Join Date
    Apr 2009
    Posts
    488

    Re: Object oriented functions in Visual Basic 6.0

    It must be possible to use the functionality of an existing class in a new class which is similar to the existing class. In Visual Basic, reusability is provided using interfaces and a procedure called delegation. To share functionality using delegation, a base class or superclass is created which contains the code to be shared. Then other classes called subclasses are created which may call the shared functions. For example, the Option button and Check Box classes have similar functionality. They can share a superclass which contains the common functions. The uncommon functions can be written in separate subclasses.

Similar Threads

  1. More combat oriented functions Vampire Wars
    By Faithist in forum Video Games
    Replies: 4
    Last Post: 10-03-2011, 05:11 AM
  2. Object Controls in Visual basic
    By Satchel in forum Software Development
    Replies: 4
    Last Post: 25-01-2011, 04:41 AM
  3. Replies: 3
    Last Post: 08-01-2011, 06:20 AM
  4. Problems with object-oriented programming, classes, objects, functions
    By Lakshmigopal in forum Software Development
    Replies: 5
    Last Post: 04-12-2010, 11:01 AM
  5. In Visual Basic How to check whether an Object exists??
    By Samarth in forum Software Development
    Replies: 4
    Last Post: 02-01-2010, 10:13 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,316,600.58817 seconds with 17 queries