Re: ATL Control cannot be used in VB .NET
So, since the ATL control works in IE, there's a good chance there's nothing wrong with your C++/ATL
code. Why post in an ATL newsgroup? Seems like VB. NET has a problem.
<arthur.mailing@gmail.com> wrote in message
news:64e0634d-8a2a-4214-85a0-a7a75b049fce@k41g2000yqh.googlegroups.com...
Hello,
I created an ActiveX Control in ATL, which I can succesfully use in
for instance Internet Explorer. When I want to put that object in a
VB.NET (2003) app, I get some problems.
First I 'Import' the control, using Visual Studio, so there are COM
Interop DLLs created. Then I insert the control in the toolbox and
drag/drop on a form. The control is succesfully created.
However, when I run the VBApp, it crashes. The debugger tells me that
it gets a 'Class Not Registered' error.
Same when I create a pushbutton and create the object manually:
Dim AxQuest3DCtrl As Object
AxQuest3DCtrl = CreateObject("MyControl.MyCtrl.1") //crashes here
If AxQuest3DCtrl Is Nothing Then
MsgBox("Ach en wee")
End If
Does anyone have a suggestion? It works fine when creating the control
in IE with VBScript and the same 'CreateObject' statement...
Greets,
Arthur