Today I want to test the function of connecting Delphi to AD,Teaching on the Internet,You can use "Component → Import Component"…” to import,But in actual operation,卻出現 “An error occurred while accessing OLE login。” Error message。
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。
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;
【參考連結】
- case method to judge string | three caves
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;
【參考連結】
- Delphi VCL force menu repaint – Stack Overflow
- once in a while: Delphi MainMenu font enlargement and Menu Checked prompt icon missing solution
procedure TfmQAB.FormShortCut(var Msg: TWMKey; var Handled: Boolean); begin if (Msg.CharCode = 116) and (HiWord(GetKeyState(VK_CONTROL)) = 1) then begin ...... end end;
【參考連結】
- Catch SHIFT key during menu item selection? – Delphi Tips – CJC Delphi (Cool Delphi Tips)
- GetKeyState:GetKeyState ,This function retrieves the specified virtual key -Encyclopedia Knowledge Chinese Network
- DELPHI OnKeyDown,OnKeyPress,OnKeyUp Difference-CSDN Blog_delphi onkeydown
- delphi key value table – Taiwan tribe
- How to detect ctrl-t keypress in Delphi – Stack Overflow
- Keyboard key code value comparison table
var vTime, vTime1, vTime2: double; begin vTime1 := GetTickCount(); vTime2 := GetTickCount(); vTime := (vTime2 - vTime1) / 1000; Showmessage(floatToStr(vTime) + 's'); end;
【參考連結】
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。