www.pudn.com > crestroncontrol.rar > CheckUpMeeting.cpp, change:2006-09-30,size:1539b


//--------------------------------------------------------------------------- 
 
#include <vcl.h> 
#pragma hdrstop 
//--------------------------------------------------------------------------- 
USEFORM("uMainForm.cpp", FormMain); 
USEFORM("Login.cpp", FormLogin); 
USEFORM("uFrameControl.cpp", FrameControl); /* TFrame: File Type */ 
USEFORM("uSelectCase.cpp", FormSelectCase); 
USEFORM("UDataModule.cpp", dmConn); /* TDataModule: File Type */ 
//--------------------------------------------------------------------------- 
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) 
{ 
    HANDLE hMutex = CreateMutex(NULL, false, "CheckMeeting"); 
    if(hMutex==NULL||ERROR_ALREADY_EXISTS==::GetLastError()) 
    { 
        MessageBox(NULL,"  系统已经在运行!     ","系统提示",MB_OK|MB_ICONINFORMATION); 
        return 0; 
    } 
    try 
    { 
         Application->Initialize(); 
         Application->CreateForm(__classid(TdmConn), &dmConn); 
         Application->CreateForm(__classid(TFrameControl), &FrameControl); 
         Application->CreateForm(__classid(TFormMain), &FormMain); 
         Application->Run(); 
    } 
    catch (Exception &exception) 
    { 
         Application->ShowException(&exception); 
    } 
    catch (...) 
    { 
         try 
         { 
             throw Exception(""); 
         } 
         catch (Exception &exception) 
         { 
             Application->ShowException(&exception); 
         } 
    } 
    return 0; 
} 
//---------------------------------------------------------------------------