creating activeX on VB.NET 2008

M

Mr. X.

Hello.

How can I make new activeX for the solution.

Is it :
add -> new project -> windows form control library ?

For that - are all the activeXs should be on the same windows form control
library.
Is the ActiveX private to my solution?
If not - how the ActiveX is exposed to every new program?

Thanks :)
 
M

Mr. X.

Well,
In VB 6 that was much easier...

I need some tutorial how can I add my own ActiveX control in VS 2008
(VB.NET)

Thanks :)
 
A

Armin Zingler

Am 31.03.2010 12:15, schrieb Mr. X.:
Well,
In VB 6 that was much easier...
I need some tutorial how can I add my own ActiveX control in VS 2008
(VB.NET)

Other than VB6, you don't have to use ActiveX to create a control now.
Just inherit from the Control class. Isn't that simple?

However, you write "create" in the title and "add" in the message.
So, if you want to _use_ an ActiveX control, just add it to the Toolbox
and drop it on the Form.

And, to save you from once trying to look in the TOC, it's described here:
http://msdn.microsoft.com/en-us/library/ms165355.aspx
 
D

DickGrier

If you want to build your own controls, follow Armin's advice.

If you want to use an ActiveX control that you may have used in VB6,
right-click on the Toolbox, and select Choose Items... from the menu.
Click on the COM Components tab and then click Browse to locate the ActiveX
control that you want to use. Click OK, and it will be added to your
Toolbox; .NET builds a wrapper assembly that provides the COM interface to
this control. You then use it with similar syntax to that of VB6. Note, if
the control that you just added was actually compiled in VB6, the property
Let/Get syntax is slightly altered.

Dick

--
Richard Grier, Consultant, Hard & Software 12962 West Louisiana Avenue
Lakewood, CO 80228 303-986-2179 (voice) Homepage: www.hardandsoftware.net
Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004, Revised July
2006.
 
M

Mr. X.

O.K.
Solved.

I created a solution, with many projects on it,
on of the project (which is called myProgCtrls) contains all the
user-control I have created.
Because the controls are in a project that is a part of the solution, each
form window I choose, and when openning the toolbox,
I see the user-controls I have created (No need to refer them especially).
That user-controls can be dropped easily on my window-form.

Thanks :)
 
M

Michel Posseth [MCP]

Aha !

So actually you just wanted to know how to create a user control in .Net
cause what you have now isn`t the same as a ActiveX control

Try to use this control in a VB6 prog and you see that it wil not work , a
True ActiveX would work in anny COM capable language
wich is VB.Net and VB6 to call just two :)


You can mimick the behavior of classic COM in .Net with only one exception
and that is a ActiveX exe
but it should only be necesary if you have to support non .Net clients

If not use "standard" user controls and standard .Net libraries

HTH

Michel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top