"Galen Somerville" <ga***@SPAM.surewest.net> wrote in message
news:%2***************@TK2MSFTNGP14.phx.gbl...
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:u6**************@TK2MSFTNGP09.phx.gbl... "Galen Somerville" <ga***@SPAM.surewest.net> schrieb: In two different Form modules
FFTcls.Currfrm = Me
In FFTcls class module
Dim CurrForm As System.Windows.Forms.Form
Public WriteOnly Property Currfrm() As System.Windows.Forms.Form
Set(ByVal Value As System.Windows.Forms.Form)
CurrForm = Value
End Set
End Property
In a sub in FFTcls module
CType(CurrForm, Label).LabMsg.Caption = clsRes.LoadResStgA(210)
[...]
The problem is I have eight labels in the Form module that may need
updating. I'm trying to avoid eight Property statements by using a late
bound thingy.
Use 'CurrForm.LabMsg.Text = ...'
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Sounds too simple (g)
GalenS
I spoke too soon. Apparently there is no way to accomplish what I want.
I have several, but vastly different, forms all containing the same 8
Labels. They also have a picture box which I draw on. But the picturebox
calls the class with the direct name.
Whereas I am trying to write to the form labels with only the name of the
form available. This makes my writing to labels as Generic. It looks like I
will have to have a class property for each label so the class knows label
names.
Then, in the class, I will have to check the form name (or whatever) and
have If's or Case statements to write to the proper label on the proper
form.
Any other ideas?
GalenS