• Advertisement

Archived

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

Help with code please

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

If you intended to correct an error in the post then please contact us.

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 this post

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

Share this post

Share on other sites
Ok, fixed the problem.

Share this post

Share on other sites

• Advertisement
• Advertisement
• Popular Tags

• Advertisement
• Popular Now

• 10
• 11
• 22
• 11
• 15
• Advertisement