473,378 Members | 1,346 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,378 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 2474
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.