|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
late bound form referenceFFTcls.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) Error on last line is that currform does not contain label. I have tried many different combinations within the Ctype( ) 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. Also I don't want to make eight calls in the Form modules if only one label has changes. GalenS
Show quote
Hide quote
"Galen Somerville" <galen@SPAM.surewest.net> schrieb: Use 'CurrForm.LabMsg.Text = ...'> 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. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
Show quote
Hide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message Sounds too simple (g)news:u67BStfKGHA.2392@TK2MSFTNGP09.phx.gbl... > "Galen Somerville" <galen@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/> GalenS
Show quote
Hide quote
"Galen Somerville" <galen@SPAM.surewest.net> wrote in message I spoke too soon. Apparently there is no way to accomplish what I want.news:%23Z6rX4fKGHA.604@TK2MSFTNGP14.phx.gbl... > > "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message > news:u67BStfKGHA.2392@TK2MSFTNGP09.phx.gbl... >> "Galen Somerville" <galen@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 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
Newbie Question 2, Reference To Controls On A Form
Problem to write a good serie of bytes in a file. Additional information: Cast from string "" to type 'Double' is not valid. error Visual Basic 2005 Report writers for VB.NET current working directory problem taskbar icon Newbie Question Saving Projects Making Bitmaps and Graphics objects - two ways Some error apper to me in my declerations |
|||||||||||||||||||||||