Results 1 to 4 of 4

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

  1. #1
    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.

  2. #2
    Join Date
    May 2009
    Posts
    511

    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.

  3. #3
    Join Date
    Apr 2009
    Posts
    488

    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.

  4. #4
    Join Date
    May 2009
    Posts
    637

    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.

Similar Threads

  1. What are objects and classes in C++?
    By Tionontati in forum Software Development
    Replies: 3
    Last Post: 28-12-2010, 08:46 AM
  2. Problems with object-oriented programming, classes, objects, functions
    By Lakshmigopal in forum Software Development
    Replies: 5
    Last Post: 04-12-2010, 11:01 AM
  3. Replies: 5
    Last Post: 11-03-2010, 09:18 AM
  4. Classes for Visual Basic 6.0 Users
    By Orton in forum Software Development
    Replies: 4
    Last Post: 27-02-2010, 06:50 AM
  5. Visual Basic 2005 or Visual Basic 6
    By Aasha in forum Software Development
    Replies: 5
    Last Post: 15-01-2009, 06:56 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,751,370,830.14907 seconds with 16 queries