axsoft
版主
發表:681 回覆:1056 積分:969 註冊:2002-03-13
發送簡訊給我
|
fancy您好: 試試看....希望幫得上忙... < class="code"> Project.CPP //--------------------------------------------------------------------------- #include
#include "Unit2.h"
#pragma hdrstop
//---------------------------------------------------------------------------
USEFORM("Unit1.cpp", Form1);
USEFORM("Unit2.cpp", Form2);
TForm2 *sFlash;
//---------------------------------------------------------------------------
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
try
{
try{
Application->Initialize();
sFlash=new TForm2(Application); //sFlash->BorderStyle=bsNone;
sFlash->Show();
sFlash->Update();
sFlash->BringToFront(); // Sleep(5000);
Application->CreateForm(__classid(TForm1), &Form1);
sFlash->SetFocus(); while(!Form1)
{
for(int x=0;x<=100;x )
{
Application->ProcessMessages();
sFlash->ProgressBar1->Position=x;
Sleep(50);
} }
if(Form1)
sFlash->Close(); Application->Run();
}
__finally
{
delete sFlash;
}
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
catch (...)
{
try
{
throw Exception("");
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
}
return 0;
}
//--------------------------------------------------------------------------- Unit2.CPP //--------------------------------------------------------------------------- #include
#pragma hdrstop #include "Unit2.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm2 *Form2;
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
: TForm(Owner)
{
}
//--------------------------------------------------------------------------- void __fastcall TForm2::FormCreate(TObject *Sender)
{ TBorderIcons tempBI = BorderIcons; tempBI >> biMaximize;
BorderIcons = tempBI; //Maximize Button tempBI >> biMinimize;
BorderIcons = tempBI; //Minimize Buttom tempBI >> biSystemMenu;
BorderIcons = tempBI; //system Menu Button }
//---------------------------------------------------------------------------
/*生活是一種藝術,用心生活才能享受生活*/
|