473,382 Members | 1,409 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,382 software developers and data experts.

Challenge for interop Champions

hello all,

i have created a windows control in VB.NET... i want to
use this control as an activex control in an activex
container.
now here is the scenario until now.

I Updated the project properties so that your assembly is
registered for COM interop by setting register for com
interop option checked.
i created the register and unregister methods inside the
control class. the code is given below:
-----------------------------------------------------------
<ComRegisterFunction()> Public Shared Sub AxRegister(ByVal
RegKey As String)
Dim sb As New StringBuilder(RegKey)
sb.Replace("HKEY_CLASSES_ROOT\", "")
Dim k As RegistryKey
k = Registry.ClassesRoot.OpenSubKey(sb.ToString,
True)
Dim ctrl As RegistryKey
ctrl = k.CreateSubKey("control")
ctrl.Close()
End Sub
<ComUnregisterFunction()> Public Shared Sub
AxUnregister(ByVal RegKey As String)
Dim sb As New StringBuilder(RegKey)
sb.Replace("HKEY_CLASSES_ROOT\", "")
Dim k As RegistryKey
k = Registry.ClassesRoot.OpenSubKey(sb.ToString,
True)
k.DeleteSubKey("control", False)
Dim inprocServer32 As RegistryKey
inprocServer32 = k.OpenSubKey("inprocServer32",
True)
k.DeleteSubKey("CodeBase", False)
k.Close()
End Sub
-----------------------------------------------------------
the project compiled successfully, and the dll was
created.

after that i copied the dll generated thus, into another
machine and registered the dll file using regasm.exe /tlb
on another machine. and the tlb file was generated and
registered successfully.

so far so good. now theoretically, i should be able to see
my control in the list of controls in project->components
window. but i can't. i can see it in project-> references
window, which is a list of non control activex components
(duh!). but i can't see it in the project->components
window.

what am i missing and where...?

this is an emergency and i am running out of time...

please help...

regards,

Nilotpal

Jul 19 '05 #1
0 1326

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

Similar topics

0
by: keefah | last post by:
Hi, I'm writing a C# web app that uses Outlook to send email. I use a reference to the Microsoft Outlook 11.0 Object Library, but it's giving me problems. I tracked down some stuff on the Net...
0
by: lacour | last post by:
I can't seem to figure out the difference between adding a COM dll reference in VS2003 and by using TLBIMP. I have a COM dll that references another COM dll, and I want the syntax of my...
8
by: Frank Buss | last post by:
A new challenge: http://www.frank-buss.de/marsrescue/index.html Have fun! Now you can win real prices. -- Frank Buß, fb@frank-buss.de http://www.frank-buss.de, http://www.it4-systems.de
8
by: Rob Edwards | last post by:
When trying to add the Microsoft CDO for Exchange Management Library (aka CDOEXM.dll) I receive the following message: "A reference to 'Microsoft CDO for Exchange Management Library' could not be...
0
by: Nilotpal | last post by:
hello all, i have created a windows control in VB.NET... i want to use this control as an activex control in an activex container. now here is the scenario until now. I Updated the project...
1
by: Ben | last post by:
Dear There, I have problem to implement a Web Service which integrate with ScanSoft OCR Engine. Scansoftware OCR Engine is run on server DLL and BIN files. What's the approach to do this...
0
by: Richard Jones | last post by:
The date for the second PyWeek challenge has been set: Sunday 26th March to Sunday 2nd April (00:00UTC to 00:00UTC). The PyWeek challenge invites entrants to write a game in one week from...
0
by: richard | last post by:
The date for the second PyWeek challenge has been set: Sunday 26th March to Sunday 2nd April (00:00UTC to 00:00UTC). The PyWeek challenge invites entrants to write a game in one week from...
2
by: JC | last post by:
Anybody knows what problem has this code? I think, in the Garbage Collector? You know the Solution? The program in the test's case, whit 350 contacts, run OK before number 86. The error is a...
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
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.