frmN.Label31.Text = frmTitle does not work in VB.net

J

J.B. Moreno

Great. This is a nice workaround for my level.
I presume, while calling, I will have to mention Me.Label30, not just
Label30.

Nope.

formsize(Me, Me.label30)

and

formsize(Me, label30)

are equivalent. About the only time you'll need to use the syntax
Me.variableName is within a routine that has either a local variable or
an argument with the same name as the class level variable.

Typically this will be in the constructor like so:

Sub New (ByVal perfectDescriptiveName as String)

Me.PerfectDescriptiveName = perfectDescriptiveName

End Sub

This leads to another point: label30 is NOT very descriptive. While I
wouldn't necessarily go through and rename it in all of your various
forms, I WOULD definitely use a more descriptive name in the signature
of formSize. Perhaps lbl2DisplayProgTitle.
 
Top