using VB6 exe in vb.net project?

S

sotto

Hi,

I have once made a little game in vb6 ... it's a 1 form application...
Now i'm wondering if i can get that application in my vb.net project i'm
making now... i want it as an easter egg or something

Is that possible - without translating it to vb.net - ?
Maybe if i make a dll of it in vb6?

thx for any info on this
 
S

Scott M.

If you turned it into a VB 6.0 .dll, you could just reference it as a COM
object from .NET and use it in .NET.
 
H

Herfried K. Wagner [MVP]

* sotto said:
I have once made a little game in vb6 ... it's a 1 form application...
Now i'm wondering if i can get that application in my vb.net project
i'm making now... i want it as an easter egg or something

Is that possible - without translating it to vb.net - ?
Maybe if i make a dll of it in vb6?

You can ship it with your .NET application and start the executable
using 'Shell' or 'System.Diagnostic.Process.Start'.
 
H

Herfried K. Wagner [MVP]

* "Scott M. said:
But would that get his VB 6 app running "in" his .NET app like he said?

"in"... He can try to create an ActiveX control with the game surface
and use this control in his VB.NET application (the OCX).
 
S

Scott M.

Why not just turn the vb 6 app into a .dll and put a wrapper around it and
use it from within .NET?
 
C

Cor

Hi Sotto,

I know comparising to Herfried and probably Scott nothing from VB6.

But for a one page thing I would translate it to VB.net.

When it is ready you have no trouble anymore with Dll that are or are not.

Just my thought,

Cor
 
S

sotto

So that would be like making a usercontrol in vb6 that i can use in vb.net?

So i'd have (in vb.Net) a form where-on i put the control & then access
some properties or methods to start the game.

ok ... think it's going to be quite a lot of adaptation of the vb6
project ... but it's good to know that it's possible

thx
 
S

sotto

sotto said:
So that would be like making a usercontrol in vb6 that i can use in vb.net?

So i'd have (in vb.Net) a form where-on i put the control & then access
some properties or methods to start the game.

ok ... think it's going to be quite a lot of adaptation of the vb6
project ... but it's good to know that it's possible

thx
 
S

sotto

No, i don't feel like rewriting the whole thing ...
it's something that works... so no need to re-invent the wheel ... and
besides, it's not too important.

You got a point with the dll-sh*t,
but i guess that's why we have the beautifull setup-projects :)

sotto
 
H

Herfried K. Wagner [MVP]

* "Scott M. said:
Why not just turn the vb 6 app into a .dll and put a wrapper around it and
use it from within .NET?

Yes, that will work too.
 

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