Delphi

No OnKeyDown event for Return key on Delphi Android 10.3.3

半腔热情 提交于 2021-02-07 11:01:16
问题 I am in the process of upgrading from Delphi 10.2.3 to 10.3.3. My android apps are now not generating an OnKeyDown event from the virtual keyboard for the Return key. I have confirmed this using a very basic newly created project so it is nothing to do with the conversion from 10.2.3 it seems. Any ideas would be appreciated. QA at embarcadero have come back with the following response: "According to this documentation - Handle keyboard actions or this - KeyEvent : When handling keyboard

Delphi 7 - ShellExecute command not working in situations

限于喜欢 提交于 2021-02-07 10:37:17
问题 I have made a Game Launcher and I use this command: procedure TFMain.ImgBtn1Click(Sender: TObject); begin ShellExecute(TForm(Owner).Handle, nil, 'starter.exe', '-lang rus', nil, SW_SHOWNORMAL); end; with '-lang rus' as a parameter. Everything works fine. The Game Launches and the language is in russian(if i put '-lang eng' it still works fine and the game is in english). The starter.exe application is inside a folder named '' bin ''. When i want to relocate the launcher outside this folder i

how to send file from server to client using indy

﹥>﹥吖頭↗ 提交于 2021-02-07 09:44:13
问题 I look for an example, how to receive a file from server (I use Indy) I want to send to server some demand On client: MyIdTCPClient.IOHandler.WriteLn('SEND_FILE'); MyIdTCPClient.IOHandler.WriteLn('1.XLS'); On Server procedure TServerMainForm.IdTCPServerExecute(AContext: TIdContext); var AStream : TMemoryStream; filesize : Integer; line, filename: String; begin line := AContext.Connection.IOHandler.ReadLn(); if line = 'SEND_FILE' then begin filename := AContext.Connection.IOHandler.ReadLn();

how to send file from server to client using indy

这一生的挚爱 提交于 2021-02-07 09:43:32
问题 I look for an example, how to receive a file from server (I use Indy) I want to send to server some demand On client: MyIdTCPClient.IOHandler.WriteLn('SEND_FILE'); MyIdTCPClient.IOHandler.WriteLn('1.XLS'); On Server procedure TServerMainForm.IdTCPServerExecute(AContext: TIdContext); var AStream : TMemoryStream; filesize : Integer; line, filename: String; begin line := AContext.Connection.IOHandler.ReadLn(); if line = 'SEND_FILE' then begin filename := AContext.Connection.IOHandler.ReadLn();

how to send file from server to client using indy

 ̄綄美尐妖づ 提交于 2021-02-07 09:43:10
问题 I look for an example, how to receive a file from server (I use Indy) I want to send to server some demand On client: MyIdTCPClient.IOHandler.WriteLn('SEND_FILE'); MyIdTCPClient.IOHandler.WriteLn('1.XLS'); On Server procedure TServerMainForm.IdTCPServerExecute(AContext: TIdContext); var AStream : TMemoryStream; filesize : Integer; line, filename: String; begin line := AContext.Connection.IOHandler.ReadLn(); if line = 'SEND_FILE' then begin filename := AContext.Connection.IOHandler.ReadLn();

How can I get an enumeration's valid ranges using RTTI or TypeInfo in Delphi

佐手、 提交于 2021-02-07 08:31:54
问题 I am using RTTI in a test project to evaluate enumeration values, most commonly properties on an object. If an enumeration is out of range I want to display text similar to what Evaluate/Modify IDE Window would show. Something like "(out of bound) 255". The sample code below uses TypeInfo to display the problem with a value outside the enumeration as an Access Violation when using GetEnumName . Any solution using RTTI or TypeInfo would help me, I just don't know the enumerated type in my test

Can array types have methods?

守給你的承諾、 提交于 2021-02-07 07:25:11
问题 I have defined a dynamic array type as follows: TMyIntegerArray = array of integer: I would like to use an IndexOf function as I would do if it were a TObject 's descendant: var MyArray : TMyIntegerArray; i : integer: begin //... i := MyArray.IndexOf(10); //... end; At the moment, the only solution I've found is to write a function who accepts the array and the target value as parameters: function IndexOf(AArray : TMyIntegerArray; ATargetValue : integer; AOffset : integer = 0); begin Result :

Change caption and attributes of ShowMessage dialog

六眼飞鱼酱① 提交于 2021-02-07 07:11:40
问题 In Delphi can you change the caption of the ShowMessage dialog because by default it is taking my exe name. And can I change the background color, size of the same? 回答1: You can create your own custom dialogs by using delphi's CreateMessageDialog function. Example below: var Dlg: TForm; begin Dlg := CreateMessageDialog('message', mtInformation, [mbOk], mbOK); // Treat Dlg like any other form Dlg.Caption := 'Hello World'; try // The message label is named 'message' with TLabel(Dlg

How to get the list of fonts available - Delphi XE3 + Firemonkey 2?

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-07 06:53:45
问题 In order to create a font picker I need to get the list of fonts available to Firemonkey. As Screen.Fonts doesn't exist in FireMonkey I thought I'd need to use FMX.Platform ? eg: if TPlatformServices.Current.SupportsPlatformService(IFMXSystemFontService, IInterface(FontSvc)) then begin edit1.Text:= FontSvc.GetDefaultFontFamilyName; end else edit1.Text:= DefaultFontFamily; However, the only function available is to return the default Font name. At the moment I'm not bothered about cross

How to check how many bytes my application wrote and read from Disk?

夙愿已清 提交于 2021-02-07 06:50:15
问题 I don't know if I didn't use the right words to search on web but I didn't find the solution to watch how much my application already read and wrote on disk. Some one can help me with this ? tks [Resolved] If some one need the function sign. type _IO_COUNTERS = record ReadOperationCount : LONGLONG; WriteOperationCount : LONGLONG; OtherOperationCount : LONGLONG; ReadTransferCount : LONGLONG; WriteTransferCount : LONGLONG; OtherTransferCount : LONGLONG; end; TIoCounters = _IO_COUNTERS; function