Public Group

Archived

This topic is now archived and is closed to further replies.

Help with code please

This topic is 5395 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Ok, this becomes very frustrating for me. And i just wanna punch a hole in my computer ( i agree i need anger management classes). The problem is, when I write a console application, it flashes on my screen and dissapears. or after final input it disappears. So i thought I figured it out by using System("pause"); as that worked with every console thing i''ve ever done. So now I go into learning windows forms with the .NET framework. And the first tutorial i''m doing with this book is console and windows form. It writes something in console and also displays a basic windows form. Well, my code is exactly like it is in the book, but mine just flashes. the system pause deal doesn''t work on this. Here''s the code:
#using <mscorlib.dll>
#using <System.dll>
#using <System.Windows.Forms.dll>
#include <tchar.h>
#include<stdlib.h>

using namespace System;
using namespace System::ComponentModel;
using namespace System::Windows::Forms;

__gc public class CppForm : public Form {
public:
CppForm() {}
};

int _tmain(void)
{

Console::WriteLine(S"Forms Example");

Application::Run(new CppForm());

return 0;
}
Ok, so any suggestions?

Share on other sites
why not just run from the commandline?

Share on other sites
Ok, fixed the problem.

1. 1
2. 2
JoeJ
20
3. 3
frob
17
4. 4
5. 5

• 10
• 10
• 11
• 13
• 9
• Forum Statistics

• Total Topics
632197
• Total Posts
3004728

×