Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 27-12-2010
Member
 
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.
Reply With Quote
  #2  
Old 27-12-2010
Member
 
Join Date: May 2009
Posts: 620
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.
Reply With Quote
  #3  
Old 27-12-2010
Member
 
Join Date: Apr 2009
Posts: 567
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
Reply With Quote
  #4  
Old 27-12-2010
Member
 
Join Date: May 2009
Posts: 525
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.
Reply With Quote
  #5  
Old 27-12-2010
Member
 
Join Date: Apr 2009
Posts: 484
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Object oriented functions in Visual Basic 6.0"
Thread Thread Starter Forum Replies Last Post
More combat oriented functions Vampire Wars Faithist Video Games 4 10-03-2011 05:11 AM
Object Controls in Visual basic Satchel Software Development 4 25-01-2011 04:41 AM
Scope of Object or variable in Object oriented Programming Languages Dėfrim Software Development 3 08-01-2011 06:20 AM
Problems with object-oriented programming, classes, objects, functions Lakshmigopal Software Development 5 04-12-2010 11:01 AM
In Visual Basic How to check whether an Object exists?? Samarth Software Development 4 02-01-2010 10:13 PM


All times are GMT +5.5. The time now is 08:50 PM.