screensaver.cpp

来自「电脑屏保程序」· C++ 代码 · 共 36 行

CPP
36
字号
//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop
//---------------------------------------------------------------------------
USEFORM("MAINFORM.cpp", Form1);
USERES("SCREENSAVER.res");
//---------------------------------------------------------------------------
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
	try
	{
     // check the command line argument, if its not /s
     // return now without running. (a complete screensaver
     // would handle each command line possibility)

   //  remove the following //'s to activate the /s procedure. The
   //  SCR file on CD was compiled with /s detection, but the EXE
   //  was compiled without /s detection so you can run it directly
   //  if (ParamStr(1) != "/s")
   //   {
   //    MessageBeep(0);  // beep for educational purposes.
   //    return 0;
   //    }

 		Application->Initialize();
		Application->CreateForm(__classid(TForm1), &Form1);
		Application->Run();
	}
	catch (Exception &exception)
	{
		Application->ShowException(&exception);
	}
	return 0;
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?