亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? apputils.pas

?? RX Library contains a large number of components, objects and routines for Borland Delphi with full
?? PAS
?? 第 1 頁 / 共 2 頁
字號:
  if IniFile is TRegIniFile then
    TRegIniFile(IniFile).DeleteKey(Section, Ident)
  else if IniFile is TIniFile then
    TIniFile(IniFile).DeleteKey(Section, Ident);
{$ELSE}
  if IniFile is TIniFile then begin
    WritePrivateProfileString(StrPLCopy(CSection, Section, SizeOf(CSection) - 1),
      StrPLCopy(CIdent, Ident, SizeOf(CIdent) - 1), nil,
      StrPLCopy(CFileName, TIniFile(IniFile).FileName, SizeOf(CFileName) - 1));
  end;
{$ENDIF}
end;

{$IFNDEF WIN32}
procedure IniFileReadSections(IniFile: TIniFile; Strings: TStrings);
const
  BufSize = 8192;
var
  CFileName: array[0..127] of Char;
  Buffer, P: PChar;
begin
  GetMem(Buffer, BufSize);
  try
    Strings.BeginUpdate;
    try
      Strings.Clear;
      if GetPrivateProfileString(nil, nil, nil, Buffer, BufSize,
        StrPLCopy(CFileName, IniFile.FileName, SizeOf(CFileName) - 1)) <> 0 then
      begin
        P := Buffer;
        while P^ <> #0 do begin
          Strings.Add(StrPas(P));
          Inc(P, StrLen(P) + 1);
        end;
      end;
    finally
      Strings.EndUpdate;
    end;
  finally
    FreeMem(Buffer, BufSize);
  end;
end;
{$ENDIF}

procedure IniReadSections(IniFile: TObject; Strings: TStrings);
begin
{$IFDEF WIN32}
  if IniFile is TIniFile then
    TIniFile(IniFile).ReadSections(Strings)
  else if IniFile is TRegIniFile then
    TRegIniFile(IniFile).ReadSections(Strings);
{$ELSE}
  if IniFile is TIniFile then
    IniFileReadSections(TIniFile(IniFile), Strings);
{$ENDIF}
end;

procedure InternalSaveMDIChildren(MainForm: TForm; IniFile: TObject);
var
  I: Integer;
begin
  if (MainForm = nil) or (MainForm.FormStyle <> fsMDIForm) then
    raise EInvalidOperation.Create(ResStr(SNoMDIForm));
  IniEraseSection(IniFile, siMDIChild);
  if MainForm.MDIChildCount > 0 then begin
    IniWriteInteger(IniFile, siMDIChild, siListCount,
      MainForm.MDIChildCount);
    for I := 0 to MainForm.MDIChildCount - 1 do
      IniWriteString(IniFile, siMDIChild, Format(siItem, [I]),
        MainForm.MDIChildren[I].ClassName);
  end;
end;

procedure InternalRestoreMDIChildren(MainForm: TForm; IniFile: TObject);
var
  I: Integer;
  Count: Integer;
  FormClass: TFormClass;
begin
  if (MainForm = nil) or (MainForm.FormStyle <> fsMDIForm) then
    raise EInvalidOperation.Create(ResStr(SNoMDIForm));
  StartWait;
  try
    Count := IniReadInteger(IniFile, siMDIChild, siListCount, 0);
    if Count > 0 then begin
      for I := 0 to Count - 1 do begin
        FormClass := TFormClass(GetClass(IniReadString(IniFile, siMDIChild,
          Format(siItem, [Count - I - 1]), '')));
        if FormClass <> nil then
          InternalFindShowForm(FormClass, '', False);
      end;
    end;
  finally
    StopWait;
  end;
end;

{$IFDEF WIN32}
procedure SaveMDIChildrenReg(MainForm: TForm; IniFile: TRegIniFile);
begin
  InternalSaveMDIChildren(MainForm, IniFile);
end;

procedure RestoreMDIChildrenReg(MainForm: TForm; IniFile: TRegIniFile);
begin
  InternalRestoreMDIChildren(MainForm, IniFile);
end;
{$ENDIF WIN32}

procedure SaveMDIChildren(MainForm: TForm; IniFile: TIniFile);
begin
  InternalSaveMDIChildren(MainForm, IniFile);
end;

procedure RestoreMDIChildren(MainForm: TForm; IniFile: TIniFile);
begin
  InternalRestoreMDIChildren(MainForm, IniFile);
end;

procedure InternalSaveGridLayout(Grid: TCustomGrid; IniFile: TObject;
  const Section: string);
var
  I: Longint;
begin
  for I := 0 to TDrawGrid(Grid).ColCount - 1 do
    IniWriteInteger(IniFile, Section, Format(siItem, [I]),
      TDrawGrid(Grid).ColWidths[I]);
end;

procedure InternalRestoreGridLayout(Grid: TCustomGrid; IniFile: TObject;
  const Section: string);
var
  I: Longint;
begin
  for I := 0 to TDrawGrid(Grid).ColCount - 1 do
    TDrawGrid(Grid).ColWidths[I] := IniReadInteger(IniFile, Section,
      Format(siItem, [I]), TDrawGrid(Grid).ColWidths[I]);
end;

{$IFDEF WIN32}
procedure RestoreGridLayoutReg(Grid: TCustomGrid; IniFile: TRegIniFile);
begin
  InternalRestoreGridLayout(Grid, IniFile, GetDefaultSection(Grid));
end;

procedure SaveGridLayoutReg(Grid: TCustomGrid; IniFile: TRegIniFile);
begin
  InternalSaveGridLayout(Grid, IniFile, GetDefaultSection(Grid));
end;
{$ENDIF WIN32}

procedure RestoreGridLayout(Grid: TCustomGrid; IniFile: TIniFile);
begin
  InternalRestoreGridLayout(Grid, IniFile, GetDefaultSection(Grid));
end;

procedure SaveGridLayout(Grid: TCustomGrid; IniFile: TIniFile);
begin
  InternalSaveGridLayout(Grid, IniFile, GetDefaultSection(Grid));
end;

function CrtResString: string;
begin
  Result := Format('(%dx%d)', [GetSystemMetrics(SM_CXSCREEN),
    GetSystemMetrics(SM_CYSCREEN)]);
end;

function ReadPosStr(IniFile: TObject; const Section, Ident: string): string;
begin
  Result := IniReadString(IniFile, Section, Ident + CrtResString, '');
  if Result = '' then Result := IniReadString(IniFile, Section, Ident, '');
end;

procedure WritePosStr(IniFile: TObject; const Section, Ident, Value: string);
begin
  IniWriteString(IniFile, Section, Ident + CrtResString, Value);
  IniWriteString(IniFile, Section, Ident, Value);
end;

procedure InternalWriteFormPlacement(Form: TForm; IniFile: TObject;
  const Section: string);
var
  Placement: TWindowPlacement;
begin
  Placement.Length := SizeOf(TWindowPlacement);
  GetWindowPlacement(Form.Handle, @Placement);
  with Placement, TForm(Form) do begin
    if (Form = Application.MainForm) and IsIconic(Application.Handle) then
      ShowCmd := SW_SHOWMINIMIZED;
    if (FormStyle = fsMDIChild) and (WindowState = wsMinimized) then
      Flags := Flags or WPF_SETMINPOSITION;
    IniWriteInteger(IniFile, Section, siFlags, Flags);
    IniWriteInteger(IniFile, Section, siShowCmd, ShowCmd);
    IniWriteInteger(IniFile, Section, siPixels, Screen.PixelsPerInch);
    WritePosStr(IniFile, Section, siMinMaxPos, Format('%d,%d,%d,%d',
      [ptMinPosition.X, ptMinPosition.Y, ptMaxPosition.X, ptMaxPosition.Y]));
    WritePosStr(IniFile, Section, siNormPos, Format('%d,%d,%d,%d',
      [rcNormalPosition.Left, rcNormalPosition.Top, rcNormalPosition.Right,
      rcNormalPosition.Bottom]));
  end;
end;

{$IFDEF WIN32}
procedure WriteFormPlacementReg(Form: TForm; IniFile: TRegIniFile;
  const Section: string);
begin
  InternalWriteFormPlacement(Form, IniFile, Section);
end;
{$ENDIF WIN32}

procedure WriteFormPlacement(Form: TForm; IniFile: TIniFile;
  const Section: string);
begin
  InternalWriteFormPlacement(Form, IniFile, Section);
end;

{$IFDEF WIN32}
procedure SaveFormPlacement(Form: TForm; const IniFileName: string;
  UseRegistry: Boolean);
{$ELSE}
procedure SaveFormPlacement(Form: TForm; const IniFileName: string);
{$ENDIF WIN32}
var
  IniFile: TObject;
begin
{$IFDEF WIN32}
  if UseRegistry then IniFile := TRegIniFile.Create(IniFileName)
  else IniFile := TIniFile.Create(IniFileName);
{$ELSE}
  IniFile := TIniFile.Create(IniFileName);
{$ENDIF WIN32}
  try
    InternalWriteFormPlacement(Form, IniFile, Form.ClassName);
  finally
    IniFile.Free;
  end;
end;

{$IFDEF WIN32}
  {$HINTS OFF}
{$ENDIF}

type

{*******************************************************}
{ !! ATTENTION Nasty implementation                     }
{*******************************************************}
{                                                       }
{ This class definition was copied from FORMS.PAS.      }
{ It is needed to access some private fields of TForm.  }
{                                                       }
{ Any changes in the underlying classes may cause       }
{ errors in this implementation!                        }
{                                                       }
{*******************************************************}

  TNastyForm = class(TScrollingWinControl)
  private
    FActiveControl: TWinControl;
    FFocusedControl: TWinControl;
    FBorderIcons: TBorderIcons;
    FBorderStyle: TFormBorderStyle;
{$IFDEF RX_D4}
    FSizeChanging: Boolean;
{$ENDIF}
    FWindowState: TWindowState; { !! }
  end;

  THackComponent = class(TComponent);
{$IFDEF WIN32}
  {$HINTS ON}
{$ENDIF}

procedure InternalReadFormPlacement(Form: TForm; IniFile: TObject;
  const Section: string; LoadState, LoadPosition: Boolean);
const
  Delims = [',',' '];
var
  PosStr: string;
  Placement: TWindowPlacement;
  WinState: TWindowState;
  DataFound: Boolean;
begin
  if not (LoadState or LoadPosition) then Exit;
  Placement.Length := SizeOf(TWindowPlacement);
  GetWindowPlacement(Form.Handle, @Placement);
  with Placement, TForm(Form) do begin
    if not IsWindowVisible(Form.Handle) then
      ShowCmd := SW_HIDE;
    if LoadPosition then begin
      DataFound := False;
      Flags := IniReadInteger(IniFile, Section, siFlags, Flags);
      PosStr := ReadPosStr(IniFile, Section, siMinMaxPos);
      if PosStr <> '' then begin
        DataFound := True;
        ptMinPosition.X := StrToIntDef(ExtractWord(1, PosStr, Delims), 0);
        ptMinPosition.Y := StrToIntDef(ExtractWord(2, PosStr, Delims), 0);
        ptMaxPosition.X := StrToIntDef(ExtractWord(3, PosStr, Delims), 0);
        ptMaxPosition.Y := StrToIntDef(ExtractWord(4, PosStr, Delims), 0);
      end;
      PosStr := ReadPosStr(IniFile, Section, siNormPos);
      if PosStr <> '' then begin
        DataFound := True;
        rcNormalPosition.Left := StrToIntDef(ExtractWord(1, PosStr, Delims), Left);
        rcNormalPosition.Top := StrToIntDef(ExtractWord(2, PosStr, Delims), Top);
        rcNormalPosition.Right := StrToIntDef(ExtractWord(3, PosStr, Delims), Left + Width);
        rcNormalPosition.Bottom := StrToIntDef(ExtractWord(4, PosStr, Delims), Top + Height);
      end;
      if Screen.PixelsPerInch <> IniReadInteger(IniFile, Section, siPixels,
        Screen.PixelsPerInch) then DataFound := False;
      if DataFound then begin
        if not (BorderStyle in [bsSizeable {$IFDEF WIN32}, bsSizeToolWin {$ENDIF}]) then
          rcNormalPosition := Rect(rcNormalPosition.Left, rcNormalPosition.Top,
            rcNormalPosition.Left + Width, rcNormalPosition.Top + Height);
        if rcNormalPosition.Right > rcNormalPosition.Left then begin
          if (Position in [poScreenCenter {$IFDEF RX_D4}, poDesktopCenter {$ENDIF}]) and
            not (csDesigning in ComponentState) then
          begin
            THackComponent(Form).SetDesigning(True);
            try
              Position := poDesigned;
            finally
              THackComponent(Form).SetDesigning(False);
            end;
          end;
          SetWindowPlacement(Handle, @Placement);
        end;
      end;
    end;
    if LoadState then begin
      WinState := wsNormal;
      { default maximize MDI main form }
      if ((Application.MainForm = Form) {$IFDEF RX_D4} or
        (Application.MainForm = nil) {$ENDIF}) and ((FormStyle = fsMDIForm) or
        ((FormStyle = fsNormal) and (Position = poDefault))) then
        WinState := wsMaximized;
      ShowCmd := IniReadInteger(IniFile, Section, siShowCmd, SW_HIDE);
      case ShowCmd of
        SW_SHOWNORMAL, SW_RESTORE, SW_SHOW:
          WinState := wsNormal;
        SW_MINIMIZE, SW_SHOWMINIMIZED, SW_SHOWMINNOACTIVE:
          WinState := wsMinimized;
        SW_MAXIMIZE: WinState := wsMaximized;
      end;
{$IFDEF WIN32}
      if (WinState = wsMinimized) and ((Form = Application.MainForm)
        {$IFDEF RX_D4} or (Application.MainForm = nil) {$ENDIF}) then
      begin
        TNastyForm(Form).FWindowState := wsNormal;
        PostMessage(Application.Handle, WM_SYSCOMMAND, SC_MINIMIZE, 0);
        Exit;
      end;
{$ENDIF}
      if FormStyle in [fsMDIChild, fsMDIForm] then
        TNastyForm(Form).FWindowState := WinState
      else WindowState := WinState;
    end;
    Update;
  end;
end;

{$IFDEF WIN32}
procedure ReadFormPlacementReg(Form: TForm; IniFile: TRegIniFile;
  const Section: string; LoadState, LoadPosition: Boolean);
begin
  InternalReadFormPlacement(Form, IniFile, Section, LoadState, LoadPosition);
end;
{$ENDIF WIN32}

procedure ReadFormPlacement(Form: TForm; IniFile: TIniFile;
  const Section: string; LoadState, LoadPosition: Boolean);
begin
  InternalReadFormPlacement(Form, IniFile, Section, LoadState, LoadPosition);
end;

{$IFDEF WIN32}
procedure RestoreFormPlacement(Form: TForm; const IniFileName: string;
  UseRegistry: Boolean);
{$ELSE}
procedure RestoreFormPlacement(Form: TForm; const IniFileName: string);
{$ENDIF}
var
  IniFile: TObject;
begin
{$IFDEF WIN32}
  if UseRegistry then begin
    IniFile := TRegIniFile.Create(IniFileName);
  {$IFDEF RX_D5} 
    TRegIniFile(IniFile).Access := KEY_READ;
  {$ENDIF}
  end
  else 
    IniFile := TIniFile.Create(IniFileName);
{$ELSE}
  IniFile := TIniFile.Create(IniFileName);
{$ENDIF WIN32}
  try
    InternalReadFormPlacement(Form, IniFile, Form.ClassName, True, True);
  finally
    IniFile.Free;
  end;
end;

function GetUniqueFileNameInDir(const Path, FileNameMask: string): string;
var
  CurrentName: string;
  I: Integer;
begin
  Result := '';
  for I := 0 to MaxInt do begin
    CurrentName := Format(FileNameMask, [I]);
    if not FileExists(NormalDir(Path) + CurrentName) then begin
      Result := CurrentName;
      Exit;
    end;
  end;
end;

{$IFDEF WIN32}
procedure AppBroadcast(Msg, wParam: Longint; lParam: Longint);
{$ELSE}
procedure AppBroadcast(Msg, wParam: Word; lParam: Longint);
{$ENDIF WIN32}
var
  I: Integer;
begin
  for I := 0 to Screen.FormCount - 1 do
    SendMessage(Screen.Forms[I].Handle, Msg, wParam, lParam);
end;

procedure AppTaskbarIcons(AppOnly: Boolean);
var
  Style: Longint;
begin
  Style := GetWindowLong(Application.Handle, GWL_STYLE);
  if AppOnly then Style := Style or WS_CAPTION
  else Style := Style and not WS_CAPTION;
  SetWindowLong(Application.Handle, GWL_STYLE, Style);
  if AppOnly then SwitchToWindow(Application.Handle, False);
end;

end.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产在线视视频有精品| 欧美mv日韩mv国产| 日韩欧美国产成人一区二区| 国产精品久久99| 免费成人av在线播放| 色综合 综合色| 国产午夜精品福利| 首页亚洲欧美制服丝腿| 99久久久国产精品| 日韩精品一区二区三区蜜臀 | 欧美精品一区二区高清在线观看| 亚洲色图20p| 国产成人精品综合在线观看| 日韩亚洲欧美一区二区三区| 一区二区欧美视频| 成人av在线看| 久久久另类综合| 久久国内精品自在自线400部| 日本久久一区二区三区| 国产精品久久久久久久第一福利| 国产主播一区二区三区| 日韩一级免费一区| 丝袜美腿亚洲综合| 欧美性色综合网| 亚洲激情第一区| 91视视频在线观看入口直接观看www | 成人一道本在线| 久久久激情视频| 国产aⅴ综合色| 欧美高清一级片在线观看| 紧缚奴在线一区二区三区| 欧美一级黄色录像| 蜜臀国产一区二区三区在线播放| 制服丝袜一区二区三区| 日韩—二三区免费观看av| 欧美日韩免费高清一区色橹橹| 亚洲欧美成aⅴ人在线观看| 99久久精品免费精品国产| 国产精品视频免费| 成人精品在线视频观看| 亚洲人吸女人奶水| 日本久久一区二区三区| 亚洲欧洲av色图| 国产精品久久毛片a| 日韩视频一区二区三区| 亚洲男人的天堂网| 91小视频在线| 一区二区不卡在线播放 | 美女视频黄 久久| 欧美一级免费观看| 久久超碰97中文字幕| 欧美精品一区二区蜜臀亚洲| 国产精品一区二区视频| 国产精品―色哟哟| 97久久久精品综合88久久| 亚洲激情在线激情| 欧美日韩国产综合一区二区| 久热成人在线视频| 中文av一区二区| 91久久精品午夜一区二区| 亚洲国产成人av| 欧美不卡一区二区三区四区| 成人精品鲁一区一区二区| 亚洲综合偷拍欧美一区色| 欧美一区二区三区视频在线| 国产美女精品一区二区三区| 国产精品国产三级国产普通话99| 日本韩国精品一区二区在线观看| 美腿丝袜亚洲一区| 中文字幕一区二| 91精品久久久久久久久99蜜臂| 国产盗摄视频一区二区三区| 亚洲精品中文在线观看| 欧美一级日韩免费不卡| 成人18精品视频| 麻豆高清免费国产一区| 一区在线中文字幕| 欧美一级欧美一级在线播放| 99视频有精品| 蜜乳av一区二区| 亚洲精品欧美激情| 欧美tk—视频vk| 欧美性感一区二区三区| 国产高清久久久久| 亚洲大片免费看| 国产精品美女久久久久aⅴ国产馆| 欧美一区二视频| 色婷婷综合久久久久中文| 国产在线国偷精品产拍免费yy| 亚洲第一成年网| 亚洲精品视频在线| 日本一区二区免费在线观看视频 | 一本一道波多野结衣一区二区| 久久国产三级精品| 亚洲国产综合在线| 亚洲欧美另类小说视频| 国产欧美精品国产国产专区| 911国产精品| 欧美无人高清视频在线观看| 成人高清免费观看| 国产盗摄精品一区二区三区在线| 麻豆成人91精品二区三区| 亚洲资源中文字幕| 亚洲精品视频在线观看免费| 国产精品乱子久久久久| 国产农村妇女毛片精品久久麻豆 | 午夜欧美电影在线观看| 亚洲人成精品久久久久| 国产精品婷婷午夜在线观看| 国产亚洲一本大道中文在线| 欧美mv日韩mv亚洲| 欧美成人女星排名| 日韩丝袜美女视频| 日韩一区二区不卡| 日韩欧美国产成人一区二区| 日韩欧美第一区| 精品少妇一区二区三区在线视频| 日韩一区国产二区欧美三区| 欧美一级理论片| 精品sm捆绑视频| 26uuuu精品一区二区| 国产欧美精品区一区二区三区| 久久久亚洲精华液精华液精华液| 欧美精品一区二区久久婷婷| 26uuu久久天堂性欧美| 国产欧美精品一区| 成人欧美一区二区三区| 一区二区三区日韩欧美| 亚洲国产精品久久人人爱| 午夜免费欧美电影| 奇米综合一区二区三区精品视频| 美女尤物国产一区| 国产精品一二三| 99久久综合99久久综合网站| 色婷婷久久综合| 欧美日本一道本| 欧美一区二区三区人| 久久亚洲精品国产精品紫薇 | 精品日韩在线观看| 精品国产免费视频| 国产精品嫩草影院av蜜臀| 日韩理论片在线| 五月婷婷欧美视频| 国产乱码精品一区二区三区五月婷| 国产美女视频91| 色综合久久久久久久久| 欧美精品123区| 久久久久久一二三区| 亚洲猫色日本管| 日韩激情一二三区| 成人在线视频一区二区| 欧美综合久久久| 精品粉嫩aⅴ一区二区三区四区| 国产欧美一区视频| 亚洲午夜免费电影| 国产乱码字幕精品高清av| 91久久精品一区二区三区| 欧美一级在线观看| 亚洲三级在线观看| 激情久久五月天| 日本精品一区二区三区高清 | 欧美剧在线免费观看网站 | 亚洲国产欧美在线| 国产一区二区免费视频| 欧美综合一区二区| 国产欧美日韩激情| 日韩av中文在线观看| 成人av第一页| 亚洲精品一区二区三区影院 | 精品制服美女丁香| 日韩一区二区精品| 亚洲美女视频在线观看| 国产精品一区二区不卡| 粗大黑人巨茎大战欧美成人| aa级大片欧美| 免费成人在线观看| 欧美中文字幕一区| 亚洲国产视频在线| 国产一区二区三区在线观看免费| 97精品久久久午夜一区二区三区| 中文成人av在线| 不卡视频在线观看| 亚洲精品在线免费播放| 毛片av中文字幕一区二区| 亚洲精品自拍动漫在线| 一本到一区二区三区| 国产清纯白嫩初高生在线观看91 | 欧美一区中文字幕| ...av二区三区久久精品| 国产一区二区精品久久| 日韩视频一区二区| 男人的天堂亚洲一区| 欧美伦理电影网| 亚洲尤物在线视频观看| 色婷婷国产精品| 亚洲男同性视频| 色天天综合色天天久久| 亚洲人成精品久久久久久| 91麻豆6部合集magnet| 亚洲日本丝袜连裤袜办公室|