Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class builder add code
Message
De
01/12/1997 11:40:39
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Titre:
Class builder add code
Divers
Thread ID:
00063046
Message ID:
00063046
Vues:
83
Using the class builder, I have created an object having 2 properties named cSourcefile and cSourceDestination and one method named Download.

When I clicked on that object from the project, I see that a bunch of code was added. How can I avoid Visual Basic to auto add this bunch of references? I mean, I only added 2 properties and one method and Visual Basic converted that to about 25 lines. Here is the code.

'local variable(s) to hold property value(s)
Private mvarcSourceFile As String 'local copy
Private mvarcDestinationFile As String 'local copy
Public Function Download() As Integer
End Function

Public Property Let cDestinationFile(ByVal vData As String)
'used when assigning a value to the property, on the left side of an assignment.
'Syntax: X.cDestinationFile = 5
mvarcDestinationFile = vData
End Property

Public Property Get cDestinationFile() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.cDestinationFile
cDestinationFile = mvarcDestinationFile
End Property

Public Property Let cSourceFile(ByVal vData As String)
'used when assigning a value to the property, on the left side of an assignment.
'Syntax: X.cSourceFile = 5
mvarcSourceFile = vData
End Property

Public Property Get cSourceFile() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.cSourceFile
cSourceFile = mvarcSourceFile
End Property
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform