473,405 Members | 2,334 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,405 software developers and data experts.

AxImp & VB .Net

Moi
Hello,

I used AxImp on one ActiveX I've written (VC++6), and I'm trying to use the
generated assemblies in VB. Net.

it seems that the underlying ocx is not created when I'm calling the
AboutBox method
(or any method/member of my activex).

What am I missing ?

Thanks,
Laurent

Imports AxEARAXLib

Public Class Form1

Inherits System.Windows.Forms.Form

Dim myax As New AxEarAX()

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Debug.WriteLine(myax.ProductName)

Try

myax.AboutBox() ' InvalidActiveXStateException thrown here --- myax.ocx =
Nothing :(

Catch ex As Exception

Debug.WriteLine(ex.Message)

Debug.WriteLine(ex.StackTrace())

End Try

End Sub

End Class
Jul 22 '05 #1
1 2475
I think you first need to add the control to the form using
Form.Controls.Add

-Atul
http://www.ssware.com/
Shell MegaPack - Windows Explorer Shell Controls for ActiveX and .Net

"Moi" <mo*@moi.tk.invalid> wrote in message
news:db**********@ikaria.belnet.be...
Hello,

I used AxImp on one ActiveX I've written (VC++6), and I'm trying to use
the
generated assemblies in VB. Net.

it seems that the underlying ocx is not created when I'm calling the
AboutBox method
(or any method/member of my activex).

What am I missing ?

Thanks,
Laurent

Imports AxEARAXLib

Public Class Form1

Inherits System.Windows.Forms.Form

Dim myax As New AxEarAX()

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Debug.WriteLine(myax.ProductName)

Try

myax.AboutBox() ' InvalidActiveXStateException thrown here --- myax.ocx =
Nothing :(

Catch ex As Exception

Debug.WriteLine(ex.Message)

Debug.WriteLine(ex.StackTrace())

End Try

End Sub

End Class

Jul 22 '05 #2

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

Similar topics

0
by: Brewman | last post by:
When I run aximp /delay /public:..\G10PublicKey.snk /verbose c:\Windows\System32\SHDocVw.dl I get the following Microsoft (R) .NET ActiveX Control to Windows Forms Assembly Generato...
3
by: Wiktor Zychla | last post by:
I have a problem I cannot solve. My application hosts IE activex control. I follow the standard procedure: I just aximp shdocvw.dll. Note that this gives you two files: axshdocvw.dll and...
2
by: Or Lavy | last post by:
Hi there, As mentioned in message "aximp of shdocvw.dll -> problem with ShellExecute" posted before, aximp creates two files: AxSHDocVW.dll SHDocVW.dll The second has the same name as the...
1
by: Moi | last post by:
Hello, I used AxImp on one ActiveX I've written (VC++6), and I'm trying to use the generated assemblies in VB. Net. it seems that the underlying ocx is not created when I'm calling the...
0
by: John Olbert | last post by:
I am trying to use a number of Vb6 and Vcp6 ActiveX controls in various Vs2005 C# Windows Form programs. I am trying to use Aximp.exe on the Ocx file and to take the generated Dll's and add them...
9
by: madushan | last post by:
hi all , I try to generate .cs file from AxInterop.SHDocVw.dll by using the bellow command C:\Documents and Settings\malik\Desktop\Debug>aximp out:AxInterop.SHDocVw.dll /source but then bellow...
1
by: madushan | last post by:
hi all, once i try to generate .cs file by using the aximp.exe tool it gives the error the command I used: C:\Documents and Settings\malik\Desktop\tt>aximp SHDocVw.dll...
4
by: jonpb | last post by:
Hi, I used to AxImp.exe to generate the wrappers for an ActiveX control. Now how do I import the wrapper into my project? I tried "Add Reference..." and browsed to the .dlls but I still don't see...
0
by: Christian | last post by:
Hi to all,this is my first post. Im' learning C# by reading "C# fro java programmers". In the book there's a program that needs two libraries to be generated with AxImp. So,as the book shows,I...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.