re: visual c++ design with .net 2003

Started by
6 comments, last by WilyCoder 20 years, 3 months ago
Is it possible to manipulate the look of a window using c++ like you can by using c# ? (ie drag and drop to create buttons, combo boxes, etc)...
Advertisement
Yes, you can use the Form Designer with managed C++.
Yep. Just create a new C++ .NET project and you can design
Windows Forms like you do in C#, VB.NET or J#.

The generated code is put in the header (Form1.h). Very
strange.

Also, the C++ EXE is about 72 KB versus 16 KB for a C# EXE,
with an empty form. Don''t know why.


Kami no Itte ga ore ni zettai naru!
神はサイコロを振らない!
quote:Original post by tangentz
Also, the C++ EXE is about 72 KB versus 16 KB for a C# EXE,
with an empty form. Don''t know why.


The MC++ compiler likes to put extra stuff in there, and it also aligns it differently, IIRC.

If you want to edit a Win32 window, you can use the dialog editor.
C# generates smaller binary executables because it actually is an intermediate language that loads and executes within a virual machine (similar to how Java works)

This is why the binaries appear to be smaller, but bear in mind that to execute your applications a user will require the .NET redistributable which is ~23 MB iirc.

[edited by - ChaoticCanuck on January 25, 2004 5:53:58 PM]
quote:Original post by ChaoticCanuck
C# generates smaller binary executables because it actually is an intermediate language that loads and executes within a virual machine (similar to how Java works)

This is why the binaries appear to be smaller, but bear in mind that to execute your applications a user will require the .NET redistributable which is ~23 MB iirc.

[edited by - ChaoticCanuck on January 25, 2004 5:53:58 PM]



Utterly wrong rofl B-)

How many stupid people are there that visit this forum?

C# does NOT load and execute within a virtual machine. When you compile in C# it is compiled to MSIL code. The first time you run this new .exe it gets COMPILED INTO NATIVE CODE by the JIT compiler.

It has nothing at all to do with a Virtual Machine, it is just that there is a good majority of stupid people visiting these forums lately giving people misinformation.


ALSO

The poster should notice that the way they were talking about adding components to the forms is using MANAGED C++.. which works in THE EXACT SAME WAY as C#. It is compiled into MSIL code and JITed on first run.

Managed C++ ALSO requires the .NET framework in order to run.

You really should get a clue before spitting garbage out, someone might actually believe your BS =]

[edited by - Imperil on January 25, 2004 6:00:46 PM]
errm... as far as i can see the only thing he got wrong was the fact he said it used a VM when it doesnt... hardly needs the responce you gave tbh
I stand corrected on C# as it relates to JIT vs running in a VM. Unfortunately I trusted the source I read which explained that C# uses a virtual machine, and will be writing the author of the tutorial a nasty email when I get back to the office tomorrow

The C++ file is still larger because of the methods used to link in the .NET packages; it is not an issue of Microsoft sticking more things in while you aren''t looking, it is an issue of the way the different access the libraries and functionality of the .NET framework.

This topic is closed to new replies.

Advertisement