473,324 Members | 2,370 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

late bound form reference


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)
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

Feb 4 '06 #1
3 1496
"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/>
Feb 5 '06 #2

"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
Feb 5 '06 #3

"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
Feb 5 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Olaf Meding | last post by:
Is there a way to find out if I am using early or late binding given the reference ("excel" in the example below) returned by Dispatch()? >>> import win32com.client >>> excel =...
1
by: Jeff B. Jr | last post by:
First off, let me say that I'm still relatively new, so please bear with me. My problem lies in creating a program that has two parts, a core application, and then other modules that can be added...
1
by: JD Kronicz | last post by:
Hi .. I have an issue I have been beating my head against the wall on for some time. I am trying to use late binding for MS graph so that my end users don't have to worry about having the right...
2
by: hazz | last post by:
how do I do this? I am certain my Visual Studio .NET solution allowed me to do this before but I don't know how the build/debug settings were configured. In order to get around an unavoidable...
1
by: Daniel | last post by:
How do I call a delegate in late bound C# dll? there some way to do this w/ a sharedinterface file? any examples? i tried this but it doesnt work: (oType.GetMethod("IOCTLJOB").Invoke(pObj, new...
1
by: tlwright1414 | last post by:
I have Assembly A which late binds Assembly B using the following code... Assembly b = Assembly.LoadFile(@"C:\dev\B.dll"); object o = b.CreateInstance( "NameSpaceB.ClassB" ); object oEmitObj =...
17
by: David | last post by:
Hi all, I have the following problem: my program works fine, but when I add option strict at the top of the form, the following sub fails with an error that option strict does not allow late...
1
by: J Daniel Melton | last post by:
Hello, I am using late binding in a managed VC++ .NET 2003 application. I used KB 302902 (for C#) as a starting point and converted it to managed C++. I built a managed class that is intantiated...
14
by: Siv | last post by:
hi, I am converting an application that writes to an Excel spreadsheet and the code trips the "option Strict" that I would like on because the parser says "option Strict On disallows late...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.