⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 currentunit.~pas

📁 双色球分析软件
💻 ~PAS
字号:
unit CurrentUnit;

interface

uses
   Windows;
Var
   VarResolveType:Shortint;

   procedure ResolveBuckup();
   procedure ResolveRestore(VarMode:Integer);

implementation

procedure ResolveBuckup();
Var
   VarPelsHorizontal:Smallint;
   VarPelsVertical:Smallint;
begin
   VarPelsHorizontal:=GetSystemMetrics(SM_CXSCREEN); //分辨率宽
   VarPelsVertical:=GetSystemMetrics(SM_CYSCREEN); //分辨率高
   if VarPelsHorizontal=640 and VarPelsVertical=480 then VarResolveType:=1;
   if VarPelsHorizontal=800 and VarPelsVertical=600 then VarResolveType:=2;
   if VarPelsHorizontal=1024 and VarPelsVertical=768 then VarResolveType:=3;
   if VarPelsHorizontal=1280 and VarPelsVertical=1024 then VarResolveType:=4;
   //......
end;

procedure ResolveRestore(VarMode:Integer);
var
   VarDeviceMode:TDeviceMode;
begin
   if EnumDisplaySettings(nil,0,VarDeviceMode) then //取得旧的显示参数
      begin
         VarDeviceMode.dmFields:=DM_PELSWIDTH Or DM_PELSHEIGHT;
         case VarMode of
          	1:begin
                 VarDeviceMode.dmPelsWidth:=640;
                 VarDeviceMode.dmPelsHeight:=480;
              end;
            2:begin
                 VarDeviceMode.dmPelsWidth:=800;
                 VarDeviceMode.dmPelsHeight:=600;
              end;
            3:begin
                 VarDeviceMode.dmPelsWidth:=1024;
                 VarDeviceMode.dmPelsHeight:=768;
              end;
            4:begin
                 VarDeviceMode.dmPelsWidth:=1280;
                 VarDeviceMode.dmPelsHeight:=1024;
              end;
            //......
	       end;
         ChangeDisplaySettings(VarDeviceMode,0); //设置新的显示参数
      end;
end;

end.

⌨️ 快捷键说明

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