View Full Version : C++ forms

09-25-2003, 01:15 PM
I've written a program for my parents work thats in c++ and i'd like a nice gui to run it from. I recently coded in c# and youve got that really nice windows form editor in the visual studios.net. i was wondering if there was any way to design a form like that, but for c++ inside of .net.

right now, the program runs entirely in a ms-dos console... very unaestetic...

i've been poking around in the visual c++ but i can't seem to find a forms editor anywhere

any ideas?

09-25-2003, 06:21 PM
There isn't the handy visual forms editor in VC++ that there is in C#, but there are still ways to do it... unfortunately, it requires that you delve into the windows API. Or, you could do the shell in visual basic and have it link to your executables, but that would mean you'd have to re-write everything.

09-25-2003, 06:47 PM
might as well do it in c# then

09-25-2003, 08:08 PM
you need to ALT+F4 out of life.

09-30-2003, 01:57 AM
Dot net being the godlike thing it is allows you to do what you want to w/o a lot of work. You see in dot net everything is compiled down to a Common Runtime Language. Therefore you can program part of your program in vb, part in c#, and part in fortran if your heart desires.

Simply take your program and strip ot down to its casses (plural of class anyone?). Anyway, then compile that C++ down to a dll. Start a new C# windows program and add a resource (under the resource folder... right click on the folder... hit add resource) then select browse and find the dll you made with the C++. From there just access the classes as if they were part of your program. I often write controls in C# and then use VB for testing them while developing them.

09-30-2003, 09:59 AM
heh, ok, i gotta try this out then

so i compile my c++ into a dll

and i can create a c# windows form, and have button clicks call the c++ functions of the dll?

therefore everything can be in c++?

i don't get the strip everything down to the classes part...

09-30-2003, 10:07 AM
High five to acorbs... That's a really good idea.

Mr. W.
09-30-2003, 05:37 PM
Or write it in PHP/.net equivalent/python/language of your choice and make it a WEB-BASED program. That way the program is as simple as firing up the browser, and clicking the bookmark. :P Let the browser draw the UI elements for you!

09-30-2003, 06:29 PM
haven't got the slightest idea how to do web stuff :)

09-30-2003, 07:00 PM
Ok, just remove everything(almost) involved with the command line and just leave all your functions intact. Basically get rid of main(){}.