Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / February 2005



Tip: Looking for answers? Try searching our database.

Passing forms under secondary interface

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Simon Woods - 25 Feb 2005 15:14 GMT
Hi

I have a form (MyForm) with an array of usercontrols (MyControl)

I'm implementing a secondary interface (IForm) on the form and wanting to
expose information regarding the usercontrols via that secondary interface
e.g. I've a property Get Count

Class IForm
Public Property Get Count() as Long

I'm implementing the IForm on MyForm and obviously the Count property

Form MyForm
Implements IForm

Private Property Get IForm_Count() as Long
   IForm_Count = MyForm.MyControl.Count
end Property

If, once I've loaded the usercontrols, I introduce a local var

Dim l_oForm as IForm

Set l_oForm = MyForm
debug.print MyForm.MyControl.Count, l_oForm.Count

the former returns the correct number of loaded usercontrols but the
secondary interface returns 0.

The l_oForm is just a mechanism to self-reference so why doesn't it return
the correct number of usercontrols loaded

Thanks

Simon
Simon Woods - 25 Feb 2005 15:37 GMT
OK --- sorted thanks

> Hi
>
[quoted text clipped - 32 lines]
>
> Simon
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.