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

Sponsored Links



What is the use of Classes and objects in Visual basic?

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 02-01-2011
Member
 
Join Date: Dec 2010
Posts: 11
What is the use of Classes and objects in Visual basic?
  

Hey Guys, Can somebody tell me what the use of Classes and objects in Visual basic 6.0? I don?t have much knowledge about Visual basic 6.0 but still I am not able link the concept of Classes and objects in visual basic. I am not able to find any link in it. But, I am not sure about it. If there is any link than please let me know what are the links which connects Classes and objects in visual basic 6.0? If anyone who has any information about this than please let me know as soon as possible.

Reply With Quote
  #2  
Old 02-01-2011
Member
 
Join Date: May 2009
Posts: 503
Re: What is the use of Classes and objects in Visual basic?

A class is a collection of properties and methods. It just defines the structure of an object and is useless unless its objects are created. To create class in Visual Basic, you must add a class module which can be done by selecting Add Class Module from the Project menu. Defining the Properties. Properties are the characteristics of an object. Variables declared in the class module are the properties of that class. One way to define the properties is to make all the variables Public. But this is not a good practice since it violates encapsulation. Another way to define properties is to make all the variables Private and use Property Let and Property Get Procedures to store and retrieve the values in the variables respectively.
Reply With Quote
  #3  
Old 02-01-2011
Member
 
Join Date: Apr 2009
Posts: 484
Re: What is the use of Classes and objects in Visual basic?

Property Let Procedure Syntax Public Property Let ProcedureName([OptionalArgumentList, ] IncomingValue [As DataType]) [statements in procedure] PropertyName = IncomingValueEnd Property Explanation. It is used to assign value to a property. Validation can be performed on the Incoming Value before assigning it to the property. ProcedureName can be any valid identifier and becomes the name of the property for the outside world. If arguments as included, the number of arguments, their data type and order must exactly match the argument list in the Property Let procedure. If arguments are included, the incoming value must always follow the list.
Reply With Quote
  #4  
Old 02-01-2011
Member
 
Join Date: May 2009
Posts: 620
Re: What is the use of Classes and objects in Visual basic?

The data type of the incoming value and the data type of the return value of the corresponding Property Get procedure must be same. Example Public Property Let Last Name (strLastNameValue As String) mstrLastName = strLastNameValue End Property B. Property Get Procedure Syntax [Public|Private] Property GetProcedureName([OptionalArgumentList]) [As DataType] [statements in procedure] ProcedureName = PropertyNameEnd Property.
Reply With Quote
Reply

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



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "What is the use of Classes and objects in Visual basic?"
Thread Thread Starter Forum Replies Last Post
What are objects and classes in C++? Tionontati Software Development 3 28-12-2010 08:46 AM
Problems with object-oriented programming, classes, objects, functions Lakshmigopal Software Development 5 04-12-2010 11:01 AM
Basic four classes of Battlefield: Bad Company II Gayak Video Games 5 11-03-2010 09:18 AM
Classes for Visual Basic 6.0 Users Orton Software Development 4 27-02-2010 06:50 AM
Visual Basic 2005 or Visual Basic 6 Aasha Software Development 5 15-01-2009 06:56 PM


All times are GMT +5.5. The time now is 06:26 AM.