[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.vb.general.discussion

Newbie having problems with ActiveX

Phil

3/10/2011 10:11:00 AM

I have inherited an ActiveX control written, I believe in VB5 or VB6. I want
to add additional functionality. Where do I start? What software do I need. I
have no knowledge of VB, but some experience in VBA (Access). The control is
a textbox for rotating text for use in an Access application, but it lacks
the propoerty to make it transparent. Am I wasting my time trying to learn a
new language? Thanks
Phil
38 Answers

ralph

3/10/2011 12:25:00 PM

0

On Thu, 10 Mar 2011 10:11:00 GMT, "Phil" <phil@stantonfamily.co.uk>
wrote:

>I have inherited an ActiveX control written, I believe in VB5 or VB6. I want
>to add additional functionality. Where do I start? What software do I need. I
>have no knowledge of VB, but some experience in VBA (Access). The control is
>a textbox for rotating text for use in an Access application, but it lacks
>the propoerty to make it transparent. Am I wasting my time trying to learn a
>new language? Thanks
>Phil

Do you have the compiled component only?
In which case you are out of luck, and you can stop reading.

Or the VB Project (source) files?
In which case you will need the Windows Visual Basic Development
package (or Visual Studio). You can tell which version the source was
created in by simply opening up the .vbp or .ctl and looking at the
first couple of lines. VB5 source can be used in VB6 (they will be
converted). You can use VB6 files with VB5, but you'll need to do a
little manual massage.

There used to be a free ActiveX Development package for creating
ActiveX components for Office projects. I'm sure it is still available
out there somewhere. Should be able to find it if you are presistent.

-ralph

Phil

3/10/2011 2:29:00 PM

0

On 10/03/2011 12:24:37, ralph wrote:
> On Thu, 10 Mar 2011 10:11:00 GMT, "Phil" <phil@stantonfamily.co.uk>
> wrote:
>
>>I have inherited an ActiveX control written, I believe in VB5 or VB6. I want
>>to add additional functionality. Where do I start? What software do I need. I
>>have no knowledge of VB, but some experience in VBA (Access). The control is
>>a textbox for rotating text for use in an Access application, but it lacks
>>the propoerty to make it transparent. Am I wasting my time trying to learn a
>>new language? Thanks
>>Phil
>
> Do you have the compiled component only?
> In which case you are out of luck, and you can stop reading.
>
> Or the VB Project (source) files?
> In which case you will need the Windows Visual Basic Development
> package (or Visual Studio). You can tell which version the source was
> created in by simply opening up the .vbp or .ctl and looking at the
> first couple of lines. VB5 source can be used in VB6 (they will be
> converted). You can use VB6 files with VB5, but you'll need to do a
> little manual massage.
>
> There used to be a free ActiveX Development package for creating
> ActiveX components for Office projects. I'm sure it is still available
> out there somewhere. Should be able to find it if you are presistent.
>
> -ralph
>

Thanks for coming back, Ralph
I have the source files and they are in VB6. Have tried opening them in
Visual Studio 2010 Express and there appears to be an incompatibility
problem. Assuming I can overcome this, will Visual Studio create an .Ocx file

Thanks
Phil

Dee Earley

3/10/2011 2:40:00 PM

0

On 10/03/2011 14:28, Phil wrote:
> I have the source files and they are in VB6. Have tried opening them in
> Visual Studio 2010 Express and there appears to be an incompatibility
> problem. Assuming I can overcome this, will Visual Studio create an .Ocx file

Visual studio 10 can create an OCX but it won't be easy for you.
You would also need to rewrite it from scratch.

VB in VS2010 is .NET, but you will need VB6 to work on your OCX.

--
Dee Earley (dee.earley@icode.co.uk)
i-Catcher Development Team
http://www.icode.co.uk...

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)

Mayayana

3/10/2011 3:29:00 PM

0

As Dee Earley said, so-called VB 10 is not actually VB
at all. Microsoft renamed VB.Net to VB starting with
version 7, for marketing purposes. (They wanted VB
programmers to move to their .Net Java clone
programming system.) VB and VB.Net share very little
aside from a similarity in language syntax. VB.Net doesn't
even deal with ActiveX natively. It's designed to run
server-side on top of a giant VM. ActiveX in .Net requires
the intermediary of something jnown as "Interop".

VB5 and VB6 are very similar. You could use either
to work on your control. But neither is still for sale at
retail. If you can find a copy of VB or Visual Studio 5
or 6 it might cost quite a bit.

As Ralph mentioned, there was something that Microsoft
offered briefly for VB5, called the Control Creation Edition.
It's a free, mini version of VB just for making ActiveX
controls. I don't know what the point was. Probably MS
was just trying to get more people to build ActiveX
controls. At that time ActiveX controls were mainly intended
for webpages, and the more pages that Netscape couldn't
handle, the better for Microsoft.

In any case, you can still get the VBCCE. I haven't used it
myself. I don't know whether there are any limitations:

Explanation:

http://support.microsoft.com...

Download:

http://crribs.com/2010/01/visual-basic-control-creation-edition-v...

If you have any trouble with that link then try
searching for this:

"VB5_CCE.zip"

But you shouldn't have trouble. I just downloaded it. There
are two CAB SFX files inside. I converted those to CABs and
looked inside them. Everything looks right. One is the program
itself, with samples. The other is the help files.



ralph

3/10/2011 5:03:00 PM

0

On Thu, 10 Mar 2011 10:28:59 -0500, "Mayayana"
<mayayana@invalid.nospam> wrote:


>
> But you shouldn't have trouble. I just downloaded it. There
>are two CAB SFX files inside. I converted those to CABs and
>looked inside them. Everything looks right. One is the program
>itself, with samples. The other is the help files.
>

There are subtle differences between VB5 and VB6 (returning arrays,
references, UDTs, eg) - it depends on what the control is doing
whether you will run into any of them.

While you can often manually modify the VB6's .ctl and .bas files so
they will load without error, you will likely be better off creating a
Project for a similar control in the Control Edition and then just
copy and paste the code from the original VB6 files. This has the
advantage of not having to mess with the project file (.vbp) and
allows you to check for sematic issues as you go.

References will be the next issue. If you do run into a missing
reference, check to see if there isn't a newer component availble on
your development box before you go searching for, and attempt to
install an "older" version. They will be listed in the VB6 .vbp file.
This file is plain text.

-ralph

Mayayana

3/10/2011 11:54:00 PM

0


| There are subtle differences between VB5 and VB6 (returning arrays,
| references, UDTs, eg) - it depends on what the control is doing
| whether you will run into any of them.
|

I guess it's also worth mentioning, for the OP,
that VBSpeed has code for workarounds of
several missing VB5 functions:

http://www.xbeat.ne...



Phil

3/11/2011 12:52:00 AM

0

On 10/03/2011 23:54:14, "Mayayana" wrote:
>
>| There are subtle differences between VB5 and VB6 (returning arrays,
>| references, UDTs, eg) - it depends on what the control is doing
>| whether you will run into any of them.
>|
>
> I guess it's also worth mentioning, for the OP,
> that VBSpeed has code for workarounds of
> several missing VB5 functions:
>
> http://www.xbeat.ne...
>
>
>

Thanks for all your help.
Have downloaded VB5-CCE as you suggested, and modified bits of code to get it
to load Have removed statements like
Retained=0
DebugStartupOption=0
which stopped things from loading
Now trying to create the OCX before messing around with modifications any I
get a compile error here.

'USER DEFINED TYPE NOT DEFINED

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,DataMembers
Public blic Property Get DataMembers() As DataMembers 'USER DEFINED TYPE NOT
DEFINED Set DataMembers = UserControl.DataMembers
End Property

Any idea please - sorry to be so vague - groping in the dark.
Thanks
Phil

Henning

3/11/2011 1:04:00 AM

0


"Phil" <phil@stantonfamily.co.uk> skrev i meddelandet
news:ilbrni$2uh$1@speranza.aioe.org...
> On 10/03/2011 23:54:14, "Mayayana" wrote:
>>
>>| There are subtle differences between VB5 and VB6 (returning arrays,
>>| references, UDTs, eg) - it depends on what the control is doing
>>| whether you will run into any of them.
>>|
>>
>> I guess it's also worth mentioning, for the OP,
>> that VBSpeed has code for workarounds of
>> several missing VB5 functions:
>>
>> http://www.xbeat.ne...
>>
>>
>>
>
> Thanks for all your help.
> Have downloaded VB5-CCE as you suggested, and modified bits of code to get
> it
> to load Have removed statements like
> Retained=0
> DebugStartupOption=0
> which stopped things from loading
> Now trying to create the OCX before messing around with modifications any
> I
> get a compile error here.
>
> 'USER DEFINED TYPE NOT DEFINED
>
> 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
> 'MappingInfo=UserControl,UserControl,-1,DataMembers
> Public blic Property Get DataMembers() As DataMembers 'USER DEFINED TYPE
> NOT
> DEFINED Set DataMembers = UserControl.DataMembers
> End Property
>
> Any idea please - sorry to be so vague - groping in the dark.
> Thanks
> Phil

That should be:Public Property Get DataMembers() As DataMembers

/Henning



ralph

3/11/2011 1:40:00 AM

0

On Fri, 11 Mar 2011 00:52:00 GMT, "Phil" <phil@stantonfamily.co.uk>
wrote:

>Now trying to create the OCX before messing around with modifications any I
>get a compile error here.
>
> 'USER DEFINED TYPE NOT DEFINED
>
> 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
> 'MappingInfo=UserControl,UserControl,-1,DataMembers
>Public blic Property Get DataMembers() As DataMembers 'USER DEFINED TYPE NOT
>DEFINED Set DataMembers = UserControl.DataMembers
> End Property
>

It appears this control is a data consumer. If so you can not use the
CCE to create it, unfortunately one of the limitations of the free
tool is it can not be used with "data objects".

I should have realized that when you said "Access application". Sorry.

You will either have to find a copy of VB6, or re-write from scratch
using another platform.

-ralph

Thorsten Albers

3/11/2011 3:23:00 AM

0

Phil <phil@stantonfamily.co.uk> schrieb im Beitrag
<ilbrni$2uh$1@speranza.aioe.org>...
> Now trying to create the OCX before messing around with modifications any
I
> get a compile error here.
>
> 'USER DEFINED TYPE NOT DEFINED
>
> 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
> 'MappingInfo=UserControl,UserControl,-1,DataMembers
> Public blic Property Get DataMembers() As DataMembers 'USER DEFINED TYPE
NOT
> DEFINED Set DataMembers = UserControl.DataMembers
> End Property
>
> Any idea please - sorry to be so vague - groping in the dark.

My guess:
The code you have does not include just the code of the ActiveX control but
also of a VB5/6 test project since "UserControl" presumably >is the ActiveX
control< and the code shown >uses the control<. AFAIK the VBCCE doesn't
support a test project. For testing you have to use another application
which is able to handle ActiveX controls.
If this guess is right, remove all code files of the >test project< and
compile just the code files of the ActiveX control (AKA UserControl)
project.

--
Thorsten Albers

gudea at gmx.de