-
accessing Application Prop. within an activex dll
Hi,
Usually in VB we can use the forms collection to iterate into all the forms
of an Application and then for each form we can use the control collection
to iterate into the controls inside a specific form.
something similar to this:
For i= 0 To (Forms.Count - 1)
Set frmForm = Forms(niCounter)
For Each ctl In frmForm.Controls
ctlScan.Caption = ...
...
Next
Next
Is there any way to write such procedure inside an ActiveX DLL
that access these application properties (forms collection, control collection
...) by passing a variable or pointer to the application ?
(because if we check Forms.Count inside a DLL we find it empty and if we
pass it as parameter then we have the value inside the DLL but we can't iterate
the forms collection :
Set frmForm = Forms(niCounter)
... etc
see above)
Any help would be appreciated.
Thanks,
Gaby.
-
Re: accessing Application Prop. within an activex dll
Gaby,
I have seen this question posted here before. I don't think that anyone came
up with a good solution. One possibility would be to pass the collection
into the dll. You will have to pass it in as an object and check that it
is a collection, then assign it to a variable dimmed as a collection in your
dll.
Mike
"Gaby N. HADDAD" <gaby@alpha.com.lb> wrote:
>
> Hi,
>Usually in VB we can use the forms collection to iterate into all the forms
>of an Application and then for each form we can use the control collection
>to iterate into the controls inside a specific form.
>something similar to this:
>
> For i= 0 To (Forms.Count - 1)
> Set frmForm = Forms(niCounter)
> For Each ctl In frmForm.Controls
> ctlScan.Caption = ...
> ...
> Next
> Next
>
>Is there any way to write such procedure inside an ActiveX DLL
>that access these application properties (forms collection, control collection
>...) by passing a variable or pointer to the application ?
>
>(because if we check Forms.Count inside a DLL we find it empty and if we
>pass it as parameter then we have the value inside the DLL but we can't
iterate
>the forms collection :
> Set frmForm = Forms(niCounter)
> ... etc
>see above)
>
>Any help would be appreciated.
>
>Thanks,
>Gaby.
-
Re: accessing Application Prop. within an activex dll
Mike,
Thanks for the tip. but we have Forms collection and for each form we have
a control collection.
I have to loop into these collection and pass them as an array of collection
.... ?
Gaby.
"Mike" <m_culley@one.net.au> wrote:
>
>Gaby,
>
>I have seen this question posted here before. I don't think that anyone
came
>up with a good solution. One possibility would be to pass the collection
>into the dll. You will have to pass it in as an object and check that it
>is a collection, then assign it to a variable dimmed as a collection in
your
>dll.
>
>Mike
>
>
>"Gaby N. HADDAD" <gaby@alpha.com.lb> wrote:
>>
>> Hi,
>>Usually in VB we can use the forms collection to iterate into all the forms
>>of an Application and then for each form we can use the control collection
>>to iterate into the controls inside a specific form.
>>something similar to this:
>>
>> For i= 0 To (Forms.Count - 1)
>> Set frmForm = Forms(niCounter)
>> For Each ctl In frmForm.Controls
>> ctlScan.Caption = ...
>> ...
>> Next
>> Next
>>
>>Is there any way to write such procedure inside an ActiveX DLL
>>that access these application properties (forms collection, control collection
>>...) by passing a variable or pointer to the application ?
>>
>>(because if we check Forms.Count inside a DLL we find it empty and if we
>>pass it as parameter then we have the value inside the DLL but we can't
>iterate
>>the forms collection :
>> Set frmForm = Forms(niCounter)
>> ... etc
>>see above)
>>
>>Any help would be appreciated.
>>
>>Thanks,
>>Gaby.
>
-
Re: accessing Application Prop. within an activex dll
Gaby,
Once you pass it into your dll you can use it as you normally would.
Mike
"Gaby N. HADDAD" <gaby@alpha.com.lb> wrote:
>
> Mike,
>Thanks for the tip. but we have Forms collection and for each form we have
>a control collection.
>I have to loop into these collection and pass them as an array of collection
>.... ?
>
>
>Gaby.
>
>
>
>"Mike" <m_culley@one.net.au> wrote:
>>
>>Gaby,
>>
>>I have seen this question posted here before. I don't think that anyone
>came
>>up with a good solution. One possibility would be to pass the collection
>>into the dll. You will have to pass it in as an object and check that it
>>is a collection, then assign it to a variable dimmed as a collection in
>your
>>dll.
>>
>>Mike
>>
>>
>>"Gaby N. HADDAD" <gaby@alpha.com.lb> wrote:
>>>
>>> Hi,
>>>Usually in VB we can use the forms collection to iterate into all the
forms
>>>of an Application and then for each form we can use the control collection
>>>to iterate into the controls inside a specific form.
>>>something similar to this:
>>>
>>> For i= 0 To (Forms.Count - 1)
>>> Set frmForm = Forms(niCounter)
>>> For Each ctl In frmForm.Controls
>>> ctlScan.Caption = ...
>>> ...
>>> Next
>>> Next
>>>
>>>Is there any way to write such procedure inside an ActiveX DLL
>>>that access these application properties (forms collection, control collection
>>>...) by passing a variable or pointer to the application ?
>>>
>>>(because if we check Forms.Count inside a DLL we find it empty and if
we
>>>pass it as parameter then we have the value inside the DLL but we can't
>>iterate
>>>the forms collection :
>>> Set frmForm = Forms(niCounter)
>>> ... etc
>>>see above)
>>>
>>>Any help would be appreciated.
>>>
>>>Thanks,
>>>Gaby.
>>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks