VB ActiveX to VC 2005

M

Michael Tissington

I have a Visual Basic 6.0 ActiveX Control.

It seems there is no way with VS 2005 to create a similar control for
containers that host ActiverX controls, is this correct ?

I'm thinking of converting the VB 6 project to VC in VS 2005.

This seems to be a very different process.

Where is a good place to start?

How do I go about the basic for creating the 'form' to hold the various
controls that will form the main ActiveX?

Thanks
 
B

Brian Muth

Michael Tissington said:
I have a Visual Basic 6.0 ActiveX Control.

It seems there is no way with VS 2005 to create a similar control for
containers that host ActiverX controls, is this correct ?

Absolutely untrue. Anything that can be done in VB6 can be implemented in
VC8
I'm thinking of converting the VB 6 project to VC in VS 2005.

This seems to be a very different process.

Where is a good place to start?

Well, I would say, answer the question "why?". If it isn't broken.... why
waste the energy?

If you are serious about plunging ahead, you may want to consider using ATL
as the framework for accomplishing this. The main obstacle ahead of you is
the learning curve, which is not insignificant. Investment in a book such as
"ATL Internals" is probably the best course of action.
How do I go about the basic for creating the 'form' to hold the various
controls that will form the main ActiveX?

In the ATL world, you would be building on an ATL Composite Control.


HTH

Brian
 
M

Michel Posseth [MCP]

Absolutely untrue. Anything that can be done in VB6 can be implemented in


:)

Well then the TS just found you are wrong cause there is no true Activex
equivalant in .Net

for instance VS 6 has the ActiveX executable where on instance can serve
manny clients while still providing 1 Gui to all of these clients, Rick
Strahl ( [MVP] ) wrote once a nice article regarding this he could only get
it to work with manny hacks and flaws while VB6 provides this out of the
box in a stable mather

And believe me as i am a progger who has lots of pre .Net experience MS has
still some catching up to do , before the Dev environment is as good and
stable as VS 6 was ( VS .Net 2003 was stable but missed a lot of features
, VS.net 2005 has a lot of features some were reintroduced from VS 6 but is
as a dev environment pretty unstable ) .

I am a Big fan of .Net but we must also note that it has some different
aproaches and Activex has no true substitute because of a different strategy
of MS for this technology ( obsolete )

just my opinion

michel
 
W

Willy Denoyette [MVP]

Michel Posseth said:
:)

Well then the TS just found you are wrong cause there is no true Activex equivalant in
.Net

Not sure who's talking about .NET. Anyway, Brian is right when he says "Anything that can
be done in VB6 can be implemented in VC8".

Willy.
 
S

Sylvain Lafontaine

Yeah, this is the big problem with this post. The OP make a mention of VC
under VS2005 but this could be C++ (or VC8) as well as C#. You can read the
original post in ten different ways and as such, comes with ten different
answers; all good (or all wrong) in one way or another.

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
 
M

Michael Tissington

Well, I think I would have said C# if I had meant C#.

OK, to be clear I am talking about C++ (VC8)
 
W

Willy Denoyette [MVP]

Sylvain Lafontaine said:
Yeah, this is the big problem with this post. The OP make a mention of VC under VS2005
but this could be C++ (or VC8) as well as C#. You can read the original post in ten
different ways and as such, comes with ten different answers; all good (or all wrong) in
one way or another.

Hmm.... the version of VC included with VS2005 is VC8, so if he mentions VS2005 and VC then
he's talking about VC8 and certainly not about C#.
Anyway, Brians's point is...
"Anything that can be done in VB6 can be implemented in VC8"
and noone ever talked about .NET AFAIKS.

Willy.
 
S

Sylvain Lafontaine

When you speak with a newbie (without beeing rude at all) that have never
worked before with VS2005, you cannot be sure that by VC he means VC8 or C++
and not C# at all.

And second and most important, if you take a look at the newsgroup for which
he crossposted this message, you can see a lot of dotnet.languages:

microsoft.public.dotnet.languages.vb,
microsoft.public.dotnet.languages.vb.controls,
microsoft.public.dotnet.languages.vc, microsoft.public.msdn.general,
microsoft.public.vc.mfc

and none of them are part of the microsoft.public.vc.* subtree; which would
have be the natural place to look for in the first place. For someone who
don't want to speak about C# or VB.NET, that's a lot of possible confusion
here.

However, if the OP really want to convert a VB ActiveX control to a VC8
ActiveX control, then the best place to ask this question would be:

microsoft.public.vc.atl
microsoft.public.vc.mfc

and possibly other newsgroups under the microsoft.public.vc.* subtree.

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
 
M

Michael Tissington

Actually I did post in public.vc.mfc group :)

And I posted to a broad section hoping that some of the VB people might be
hanging around.
 
S

Sylvain Lafontaine

This is your real problem here: VB is no longer supported by MS and even if
most VB programs will run under Vista, there is no real future in VB
anymore.

So, what do you have to do to give some future to an ActiveX control written
in VB? Three solutions here:

1- Do nothing and keep it this way until it dies.

2- Convert it to an C++ ActiveX control using either pure C++ (very, hard),
MFC (hard) or ATL (hard too but probably the easiest way of all three).

3- Forget about ActiveX and convert/recode the whole thing using the .NET
Framework.

I don't know what this control is and what it's doing but if I were you,
chances are high that I would chose the third solution because if you never
worked before with C++, MFC or ATL, then the second solution is probably
much, much harder than you might think at first.
 
W

Willy Denoyette [MVP]

Sylvain Lafontaine said:
When you speak with a newbie (without beeing rude at all) that have never worked before
with VS2005, you cannot be sure that by VC he means VC8 or C++ and not C# at all.

Seems like *you* were sure he was talking about C#, this while he speaks about *VC* in
VS2005 and only cross-posted to VC and VB related NG's, not (cross)posting to the csharp NG.

Willy.
 
S

Sylvain Lafontaine

No, I wasn't sure at all and in fact, I was totally perplexed. This is why
I didn't answered anything to its original post and waited for other posts
in the same thread.

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
 
M

Michael Tissington

I've worked a lot with both C++ and MFC but not ATL just not ActiveX in C++

I need to stick with ActiveX because the Application (a current Microsoft
Application) only supports designing forms with ActiveX.
 
S

Sylvain Lafontaine

For an ActiveX control running under another application, my first choice
would be ATL instead of MFC. The situation is a little less clear in your
case because you have already a good knowledge of MFC but even then, if you
know nothing about COM interfaces under C++, ATL might still be a better
choice than MFC.

Many years ago, when I was working with ActiveX, I don't remember anyone
from those working around me at that time who would have chosen MFC instead
of ATL for writing an ActiveX control.
 

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