By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,107 Members | 1,216 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,107 IT Pros & Developers. It's quick & easy.

.tlb file question

P: n/a
i used regasm to make my vb.net control a tlb file...how can i add it to like
my c++ form? i used regasm and made it to a .tlb file but when i try to add
it to the toolbox it gives an error....what am i doing wrong?
--
-iwdu15
Jan 3 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
you use regasm with the /tlb option to create a tlb file which is then added
to the registry.
in your C++ application, add a reference to it by right clicking on your
references item.
you can then select the component in the COM list.

to add it to your toolbox, right-click on the components tab, and select the
control from the COM list.

kind regards,
Bruno.
"iwdu15" <iw****@discussions.microsoft.com> wrote in message
news:13**********************************@microsof t.com...
i used regasm to make my vb.net control a tlb file...how can i add it to
like
my c++ form? i used regasm and made it to a .tlb file but when i try to
add
it to the toolbox it gives an error....what am i doing wrong?
--
-iwdu15

Jan 3 '06 #2

P: n/a
i did that and i got an error saying it waasnt recognized when trying to add
it to the toolbox, and another erro when trying to add a reference...i used
regasm with the /tlb option and have a .tlb file all set
--
-iwdu15
Jan 4 '06 #3

P: n/a
i reread your original post, and am a little confused.
did you try to register the control itself, or did you build it into a
managed dll or an ActiveX dll?

you cannot directly register a control itself.
you have to build a dll that contains the control.

you then register the dll, used either regasm if you built a .NET dll, or
regsvr32 if you built an ActiveX dll.

after that you can add a reference to the control as i described earlier.

kind regards,
Bruno.

"iwdu15" wrote:
i did that and i got an error saying it waasnt recognized when trying to add
it to the toolbox, and another erro when trying to add a reference...i used
regasm with the /tlb option and have a .tlb file all set
--
-iwdu15

Jan 4 '06 #4

P: n/a
i registered the .net control using the "regasm /tlb" command in the command
prompt. i built a "Visual Basic Control Library" project and when it compiled
into a dll, i used the regasm /tlb command in the command prompt to register
it and create a .tlb file. when i try and use that either by referencing it
or by adding it to the toolbox, i get an error
--
-iwdu15

Jan 4 '06 #5

P: n/a
look at the thread 2 messages below this one, titled 'using C# dll as
COM'.
maybe you have to register your component using gacutil before using regasm,
even though i wouldn't know why, because it works without doing that on my
system.
maybe something to do with the actual control or the code behind it?

kind regards,
Bruno.

"iwdu15" <iw****@discussions.microsoft.com> wrote in message
news:5E**********************************@microsof t.com...
i registered the .net control using the "regasm /tlb" command in the
command
prompt. i built a "Visual Basic Control Library" project and when it
compiled
into a dll, i used the regasm /tlb command in the command prompt to
register
it and create a .tlb file. when i try and use that either by referencing
it
or by adding it to the toolbox, i get an error
--
-iwdu15

Jan 5 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.