| Author |
Is there a way to convert VB forms to VC?
|
|
| Marc Reinig 2004-11-18, 3:59 pm |
| I have a program written in Visual Studio 2003 Visual Basic. I would like
to move it to Visual C++. Is there an automated or relatively automated way
of doing that, or do I need to recreate all the windows by hand?
Thanks in advance,
Marco
-------------------------------------------------
Marc Reinig
Laboratory for Adaptive Optics
UCO/Lick Observatory
| |
| Herfried K. Wagner [MVP] 2004-11-18, 3:59 pm |
| "Marc Reinig" <Marco@newsgroups.nospam> schrieb:
>I have a program written in Visual Studio 2003 Visual Basic. I would like
> to move it to Visual C++.
/Why?/
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
| |
| Marc Reinig 2004-11-18, 3:59 pm |
| I have code written in VB.NET and Code written in C. I need to consilidate
the projects into individual projects. I would like to have a project that
is relatively self contained rather than part written in VB and part written
in C (DLL's). Some of the C code also needs to be used in other OS's that
don't support VB.
--
Marco
________________________
Marc Reinig
UCO/Lick Observatory
Laboratory for Adaptive Optics
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:un7btQZzEHA.3120@TK2MSFTNGP12.phx.gbl...
> "Marc Reinig" <Marco@newsgroups.nospam> schrieb:
>
> /Why?/
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
| |
| Alf P. Steinbach 2004-11-18, 3:59 pm |
| * Marc Reinig:
> [top-posting]
Don't top-post.
> I have code written in VB.NET and Code written in C. I need to consilidate
> the projects into individual projects. I would like to have a project that
> is relatively self contained rather than part written in VB and part written
> in C (DLL's). Some of the C code also needs to be used in other OS's that
> don't support VB.
If the code is well-structured then you can use it directly from Managed
C++.
What is the problem?
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
| |
|
| what is really the most annoying thing on usenet??? people complaining about
how someone else tries to help! top post, bottom post, interleaved post,
all are great as long as they contribute to the thread.
now of course i should write that the most really annoying thing is people
complaining about people complaining... but i'll leave that to your
imagination.
"Alf P. Steinbach" <alfps@start.no> wrote in message
news:419cec10.1450428953@news.individual.net...
> * Marc Reinig:
>
> Don't top-post.
>
consilidate[color=darkred]
that[color=darkred]
written[color=darkred]
that[color=darkred]
>
> If the code is well-structured then you can use it directly from Managed
> C++.
>
> What is the problem?
>
> --
> A: Because it messes up the order in which people normally read text.
> Q: Why is it such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing on usenet and in e-mail?
| |
| Alf P. Steinbach 2004-11-18, 3:59 pm |
| * Anonymous Dave:
> [Trolling]
Troll, go away.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
| |
| Marc Reinig 2004-11-18, 8:58 pm |
| Are you saying that in a single project, I can intermingle C++ and VB using
managed code? I've never dealt with that feature.
Marco
________________________
Marc Reinig
UCO/Lick Observatory
Laboratory for Adaptive Optics
| |
| Alf P. Steinbach 2004-11-19, 3:56 am |
| * Marc Reinig:
> Are you saying that in a single project, I can intermingle C++ and VB using
> managed code? I've never dealt with that feature.
You can use Managed C++ classes from VB.NET, and vice versa; I think
you're well aware of that and simply trolling.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
| |
| Alf P. Steinbach 2004-11-19, 3:56 am |
| * Craig:
> Unfortunately Marc, I cannot provide an answer to your question, but ...
Then you should not be posting.
> "Alf P. Steinbach" <alfps@start.no> wrote in message
> news:419cf3c8.1452404687@news.individual.net...
>
> Pot ... meet kettle ...
>
> I couldn't resist.
When you can't resist the urge of namecalling it usually means you have
low self-esteem. Sometimes there are other reasons, typically also of a
personal nature. On what grounds are you calling me "pot" or "kettle"?
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
| |
| Herfried K. Wagner [MVP] 2004-11-19, 8:58 am |
| "Dave" <noone@nowhere.com> schrieb:
> what is really the most annoying thing on usenet??? people complaining
> about
> how someone else tries to help! top post, bottom post, interleaved post,
> all are great as long as they contribute to the thread.
For those interested in improving their posting style:
The seven don'ts of Usenet
<URL:http://www.cs.tut.fi/~jkorpela/usenet/dont.html>
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
| |
| Alf P. Steinbach 2004-11-19, 3:59 pm |
| * Marc Reinig:
> My last post was not top posted.
Grow up.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
| |
| Lucas Tam 2004-11-22, 3:58 am |
| alfps@start.no (Alf P. Steinbach) wrote in news:419cec10.1450428953
@news.individual.net:
> Some of the C code also needs to be used in other OS's that
>
> If the code is well-structured then you can use it directly from Managed
> C++.
>
> What is the problem?
But managed C++ only runs on Windows doesn't it? What happens if he wants
to compile for Linux or Solaris?
--
Lucas Tam (REMOVEnntp@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
[url]http://members.ebay.com/aboutme/ spot18/[/url]
| |
| Marc Reinig 2004-11-22, 3:59 pm |
| I'm still unclear. If I have C or C++ code that doesn't make any calls to
managed resources, they only provide algorithm execution and access to
capture devices through 3rd party DLL's::
1. Can I integrate these modules with VB.NET directly and compile a single
executable?
2. Do I have to do something to the code to make it integrate with VB.NET
(besides translating to VB)
3. Must I make these modules into DLL's?
Thanks in advance,
Marco
________________________
Marc Reinig
UCO/Lick Observatory
Laboratory for Adaptive Optics
"Lucas Tam" <REMOVEnntp@rogers.com> wrote in message
news:Xns95A91BB60B9B0nntprogerscom@140.99.99.130...
> alfps@start.no (Alf P. Steinbach) wrote in news:419cec10.1450428953
> @news.individual.net:
>
>
> But managed C++ only runs on Windows doesn't it? What happens if he wants
> to compile for Linux or Solaris?
| |
| Anon-E-Moose 2004-11-22, 3:59 pm |
| "Marc Reinig" <Marco@newsgroups.nospam> wrote in
news:OHl4lWL0EHA.392@TK2MSFTNGP12.phx.gbl:
> I'm still unclear. If I have C or C++ code that doesn't make any
> calls to managed resources, they only provide algorithm execution and
> access to capture devices through 3rd party DLL's::
> 1. Can I integrate these modules with VB.NET directly and compile a
> single executable?
No, as far as I am aware, you cannot mix and match different languages
within the same project. HOWEVER, mixing of language is a feature of
VS.NET 2005.
What you can do is create a managed C++ project, build a DLL, and then
reference the DLL from your VB.NET project.
OR, you can stick with unmanaged C/C++ code, build a Windows API DLL,
declare the functions in VB.NET, and use the functions via the DLL.
OR lastly, you can convert your C/C++ code into a COM object and
reference it in VB.NET via interops (Interops are automatically
generated by VS.NET).
> 2. Do I have to do something to the code to make it integrate with
> VB.NET (besides translating to VB)
Make a note that VB.NET doesn't really support pointers and direct
memory access. So if you're doing alot of unmanaged operations, the
logic may need to be rewritten.
> 3. Must I make these modules into DLL's?
No, you can always create a new class and compile it into your .exe (and
not expose the files as a library).
| |
| Alf P. Steinbach 2004-11-22, 3:59 pm |
| * Marc Reinig:
> I'm still unclear. If I have C or C++ code that doesn't make any calls to
> managed resources, they only provide algorithm execution and access to
> capture devices through 3rd party DLL's::
>
> 1. Can I integrate these modules with VB.NET directly and compile a single
> executable?
No.
> 2. Do I have to do something to the code to make it integrate with VB.NET
> (besides translating to VB)
Presumably you mean, "other than the option of translating the code to
VB".
It depends.
Assuming you want to call C++ code from VB.NET (this includes the case
of calling C code), you can:
A Package the C++ code as an ordinary unmanaged DLL, then use platform
invoke to access the DLL functions from VB.NET.
B Package the C++ code as a COM class, e.g. a DLL, and use the .NET
tool to automatically create a .NET wrapper class for a COM class,
which you can then use from VB.NET as any other .NET class (if it's
already available as a COM/ActiveX class this would be natural).
C Package the C++ code as a .NET class or classes, physically in a
DLL (which means you do all the managed <-> unmanaged glue code in
C++), which you can then use from VB.NET as any other .NET class.
Option C is possibly the cleanest approach, because at the VB level you
then only have .NET data types.
But there are many other approaches than directly calling the code from
VB. For example, you could make a C++ process that communicated with
the VB.NET GUI via mailslots or files or whatever. It's difficult to
say without knowing more about the concrete problem.
> 3. Must I make these modules into DLL's?
No, but you _can_ do that, and it's probably the most practical way to
go.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
| |
| mocolt 2004-12-23, 3:35 am |
| Hi Can someone help me to either convert C++ codes into DLL or whatever I can so I can use it in my VB program.. I hope someone can help me..... | |
| mocolt 2004-12-23, 3:38 am |
| [QUOTE]
You can use Managed C++ classes from VB.NET, and vice versa; I think
you're well aware of that and simply trolling.
How? What is managed C++? CAn someone show me? |
|
|
|