zoukankan      html  css  js  c++  java
  • 如何取得系统支持的所有显示模式

    procedure GetVideoModes(ModeList: TStringList);
    { proc to retrieve a list of acceptable video modes of the current video card. }
    { **********************************************
    Usage:
    procedure TForm1.FormCreate(Sender: TObject);
    var
    StrList: TStringList;
    begin
    StrList := TStringList.Create;
    try
    GetVideoModes(StrList);
    Memo1.Lines := StrList;
    finally
    StrList.Clear;
    StrList.Free;
    end;
    end;
    ************************************************ }
    var
    i, j: integer;
    MoreModes,
    AddMode: boolean;
    dm: TDeviceMode;
    Mode: string;
    begin
    ModeList.Clear;
    MoreModes := True;
    Mode := ';
    i := 0;
    while MoreModes do
    begin
    MoreModes := EnumDisplaySettings(nil, i, dm);
    Mode := IntToStr(dm.dmBitsPerPel) + ' Bits Per Pixel ' +
    IntToStr(dm.dmPelsWidth) + ' x ' +
    IntToStr(dm.dmPelsHeight);
    AddMode := True;
    { Check to make sure this mode is not already in the list. }
    for j := 0 to ModeList.Count-1 do
    if Mode = ModeList[j] then
    AddMode := False;
    if AddMode then
    ModeList.Add(Mode);
    Inc(i);
    end;
    end;

  • 相关阅读:
    字符串的长度 -- js
    导入drupal中文语言包
    ubuntu修改iP地址
    人生需要苦难和敌人
    Drupal.theme未解之谜
    如何定义带下标的js数组
    smtp admin email 似乎可以考虑在
    js中的apply 和 call
    js 点号 中括号
    代码调试
  • 原文地址:https://www.cnblogs.com/martian6125/p/9631360.html
Copyright © 2011-2022 走看看