Feb 19

Quick Report in 1920*1080 resolution plus 125% When the above display setting environment is,The proportion of "Preview Print" will be incorrect.(too big or too small),But the actual printing is normal.,If you want to correct,It is necessary to modify the qrprntr.pas file of Quick Report in the compilation environment,There are two ways to correct it。

Continue browsing »

Jul 11
unit unit1;

interface

uses
  Windows, Messages....

type
  TFormName = (Casefm1, Casefm2, Casefm3);

function xxx(): Boolean;
var
  StrFormName: String;
  CaseFormName: TFormName;
begin
  StrFormName := 'Case' + vFormName; 
  // 將 FormName(物件) 與 TFormName(值) 做區隔。
  // (vFormName為帶有各FormName的字串變數)
  CaseFormName := TFormName(GetEnumValue(TypeInfo(TFormName), StrFormName));

  case CaseFormName of
    Casefm1:
      begin
        ..............
      end;

    Casefm2:
      begin
        ..............
      end;

    Casefm3: 
      begin
       ...............
      end;

【參考連結】

Jul 11

Delphi menus seem to always have fonts that go back to default (8, Tahoma) The problem,Questions from abroad,but no solution。The temporary solution I can think of at the moment is to set a function key (Can be set as hotkey),Let user encounter small font size,Reset font size by yourself。(During testing, the menu font can be changed back to the default value by changing the Windows display size percentage)

procedure Tmainform.N93Click(Sender: TObject);
begin
  Screen.MenuFont.Size := 12;
  xxxxxx.BringToFront; // 改變畫面焦點,以刷新選單畫面。
end;

【參考連結】

Jul 11
procedure TfmQAB.FormShortCut(var Msg: TWMKey; var Handled: Boolean);
begin
if (Msg.CharCode = 116)  and (HiWord(GetKeyState(VK_CONTROL)) = 1)  then 
  begin
    ......
  end
end;

【參考連結】

Jul 11
var
  vTime, vTime1, vTime2: double;
begin
  vTime1 := GetTickCount();
  vTime2 := GetTickCount();
  vTime := (vTime2 - vTime1) / 1000;
  Showmessage(floatToStr(vTime) + 's');
end;

【參考連結】

Nov 23

Two weeks before the company network architecture major renovations,So busy bee,在修改print server的IP時,Two very machine crooked,Yuzuru not break our destination 是 one start,After 好 來改 after,Becomes idle for a period of time as long as,He will be disconnected,One integer heaven 試了,Finally abandoned,I grabbed a small program,Let the program on the Server every 30 seconds on the print server to ping it。

Continue browsing »