program rmstsc;

{ 关闭RTTI反射机制减少EXE文件尺寸 }
{$IF CompilerVersion >= 21.0}
{$WEAKLINKRTTI ON}
{$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}
{$IFEND}

uses
  Vcl.Forms,
  uFrmMain in 'uFrmMain.pas' {frmMain},
  uFrmServerInfo in 'uFrmServerInfo.pas' {FrmServerInfo},
  Vcl.Themes,
  Windows,
  Vcl.Styles,
  uFrmSetPwd in 'uFrmSetPwd.pas' {FrmSetPwd},
  uFrmSetup in 'uFrmSetup.pas' {FrmSetup},
  CommonFunc in 'Extend\CommonFunc.pas',
  RdpCrypt in 'Extend\RdpCrypt.pas',
  DBTree in 'Extend\DBTree.pas';

{$R *.res}

var
  Hwnd:THandle;
begin
  Hwnd:=FindWindow(nil, '远程连接管理工具');
  if Hwnd>0 then begin
    ShowWindow(Hwnd,SW_SHOWNORMAL);
    windows.setfocus(Hwnd);
    windows.SetForegroundWindow(Hwnd);
  end
  else begin
//    ReportMemoryLeaksOnShutdown := DebugHook<>0;
    Application.Initialize;
    Application.MainFormOnTaskbar := True;
    TStyleManager.TrySetStyle('Iceberg Classico');
    Application.CreateForm(TfrmMain, frmMain);
  Application.Run;
  end;
end.
