Application.ProductName in DLL?

  • Thread starter Thread starter Scott McNair
  • Start date Start date
S

Scott McNair

Hi,

I had originally designed an item as a user control, and now I'm going back
and re-creating it as an actual component. Making it as a control was a
poor decision on my part, and I'm trying to correct my mistake while I can.

There's only one problem I'm encountering... there's an error-trapping
subroutine that pulls the name of the calling application with
Application.ProductName. This works fine in the user-control portion, but
in the user-component portion, it shows an error.

What would be a good equivalent for use within a component?

Regards,
Scott M.
 
Scott McNair said:
Hi,

I had originally designed an item as a user control, and now I'm going
back
and re-creating it as an actual component. Making it as a control was a
poor decision on my part, and I'm trying to correct my mistake while I
can.

There's only one problem I'm encountering... there's an error-trapping
subroutine that pulls the name of the calling application with
Application.ProductName. This works fine in the user-control portion, but
in the user-component portion, it shows an error.

What would be a good equivalent for use within a component?

Regards,
Scott M.

Why not pass the calling application name as a parameter of your component?
 
Why not pass the calling application name as a parameter of your
component?

Unfortunately, it's a dotnettification of a VB6 user control written by
another user, which is hooked into religiously by a huge number of calling
apps. In order to maintain reverse compatibility I can't change the
calling parameters (or the output).

Granted, I could overload the function so that it has the option of
requesting an application name as a parameter, but that only provides a
partial, less satisfactory solution.
 
Back
Top