Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [STAThreadAttribute]
- int main(array<System::String ^> ^args)
- {
- Application::EnableVisualStyles();
- Application::SetCompatibleTextRenderingDefault(false);
- Application::Run(gcnew Form1());
- return 0;
- }
- int main(array<System::String ^> ^args)
- {
- System::Threading::Thread::CurrentThread->ApartmentState = System::Threading::ApartmentState::STA;
- if (Thread::CurrentThread->GetApartmentState() != ApartmentState::STA)
- {
- CoUninitialize();
- CoInitialize(NULL);
- }
- Application::EnableVisualStyles();
- Application::SetCompatibleTextRenderingDefault(false);
- // Create the main window and run it
- Application::Run(gcnew Form1());
- return 0;
- }
Add Comment
Please, Sign In to add comment