What does the Attribute keyword do in VB6?

I am converting VB6 code to VB.Net. Since my VB6 installation is damaged after repair, I use Notepad to read the source code and can see at the top of the file: -

Attribute VB_Name = "clsBulge"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Attribute VB_Description = "Some text here"
Attribute VB_Ext_KEY = "SavedWithClassBuilder" ,"Yes"
Attribute VB_Ext_KEY = "Member0" ,"collBulges"
Attribute VB_Ext_KEY = "Top_Level" ,"Yes"

and down among the works: -

Public Property Let Amplitude(ByVal vData As Double)
Attribute Amplitude.VB_Description = "Some text here"
    mvaInternal = vData
End Property

The question is, should I worry about this when converting to VB.Net? If so, where can I find out what all these things mean?

The question and answer here does not imply, but is not really an authoritative source. A similar question asked here is rapidly shifting to irrelevance.

+4
source share
1 answer

VB Attributes VBA, , .

Attribute VB_Name = "clsBulge"

, . , Dim foo = New clsBulge.

Attribute VB_GlobalNameSpace = False

, true, . , . , VBA , , "" .

, True. , "", , "" , , .Net.

Attribute VB_PredeclaredId = False

VB_GlobalNameSpace, . Static .Net. ... , . .

Attribute VB_Creatable = True

. . , True, . . False, ctor.

Attribute VB_Exposed = False

. True , False - . VB_Creatable .

Attribute VB_Description = "Some text here"

<Summary> doc. VB6 ( VBA). , COM- . .Net ComponentModel.Description. , COM , , .

Attribute VB_Ext_KEY = "SavedWithClassBuilder" ,"Yes"
Attribute VB_Ext_KEY = "Member0" ,"collBulges"
Attribute VB_Ext_KEY = "Top_Level" ,"Yes"

, IDE. , , .

+5

Source: https://habr.com/ru/post/1615387/


All Articles