Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class builder add code
Message
From
01/12/1997 11:40:39
 
 
To
All
General information
Forum:
Visual Basic
Category:
Other
Title:
Class builder add code
Miscellaneous
Thread ID:
00063046
Message ID:
00063046
Views:
85
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
Next
Reply
Map
View

Click here to load this message in the networking platform