Delphi

Delphi fmx控件在手机滑动与单击的问题

梦想的初衷 提交于 2021-02-07 06:36:18
Delphi fmx控件在手机滑动与单击的问题 (2016-03-08 10:52:00) 转载 ▼ 标签: it delphi 分类: Delphi10 众所周知,fmx制作的app,对于象TEdit这样的控件,当你在Edit上面,上下滑动时,会产生单击事件,进而会弹出键盘,而这时候,用户做的滑动操作,是不想弹出键盘的。这就让你的app很不友好了。 我在QC上提出了这个需求,具体是 https://quality.embarcadero.com/browse/RSP-13900 。如果明白了这个问题,肯请来投一票,督促官方在FMX低层修正。 后记:看到有朋友说可以用OnTap事件来取代OnClick,我试了下,果真好用,但还是会弹出输入法,也就是说在OnEdit上滑动会自动弹出输入法,还是不友好。但按这个思路,可以在OnTap中确定是否弹出输入法来解决。 来源: oschina 链接: https://my.oschina.net/u/4314127/blog/3655702

Delphi assembler constant 'eof'

孤者浪人 提交于 2021-02-07 05:37:25
问题 There seems to be an undocumented constant eof in asm block context. This was tested using Delphi 7. program TestEof; {$APPTYPE CONSOLE} var example : Integer; begin asm mov example, eof end; writeln(example); readln; end. This prints out 14 . Where does that constant eof and it's value value $0E or 14 come from? EDIT: this is the compilation result ... call @InitExe // mov example, eof mov [example], $0000000e // writeln(example) mov eax, [$004040a4] mov edx, [example] call @Write0Long call

Moving Columns in a DBGrid seems to move the attached DataSet fields

吃可爱长大的小学妹 提交于 2021-02-07 05:19:51
问题 I observed something last week that I did not expect, and will describe below. I am curious as to why this happens. Is it something internal to the TDataSet class, an artifact of the TDBGrid, or something else? The order of the fields in an open ClientDataSet changed. Specifically, I created a ClientDataSet in code by calling CreateDatatSet after defining its structure using FieldDefs. The first field in this ClientDataSet's structure was a Date field named StartOfWeek. Only moments later,

Moving Columns in a DBGrid seems to move the attached DataSet fields

回眸只為那壹抹淺笑 提交于 2021-02-07 05:18:12
问题 I observed something last week that I did not expect, and will describe below. I am curious as to why this happens. Is it something internal to the TDataSet class, an artifact of the TDBGrid, or something else? The order of the fields in an open ClientDataSet changed. Specifically, I created a ClientDataSet in code by calling CreateDatatSet after defining its structure using FieldDefs. The first field in this ClientDataSet's structure was a Date field named StartOfWeek. Only moments later,

How do I hook global shortcuts in Windows?

与世无争的帅哥 提交于 2021-02-07 03:40:15
问题 I remember using a program, some years back, that allowed me to fine-tune my monitor's settings with custom gamma ramps and other adjustments. It had the ability to create different screen-settings profiles for different uses, and setup global hotkey shortcuts to activate them without switching out of the program you're in. My question is, how do you set up the hook for that? I'm sick of WINDOWS-D minimizing everything when I only want access to the desktop in one screen and I want to keep

How do I hook global shortcuts in Windows?

别等时光非礼了梦想. 提交于 2021-02-07 03:37:45
问题 I remember using a program, some years back, that allowed me to fine-tune my monitor's settings with custom gamma ramps and other adjustments. It had the ability to create different screen-settings profiles for different uses, and setup global hotkey shortcuts to activate them without switching out of the program you're in. My question is, how do you set up the hook for that? I'm sick of WINDOWS-D minimizing everything when I only want access to the desktop in one screen and I want to keep

How do I hook global shortcuts in Windows?

不想你离开。 提交于 2021-02-07 03:36:59
问题 I remember using a program, some years back, that allowed me to fine-tune my monitor's settings with custom gamma ramps and other adjustments. It had the ability to create different screen-settings profiles for different uses, and setup global hotkey shortcuts to activate them without switching out of the program you're in. My question is, how do you set up the hook for that? I'm sick of WINDOWS-D minimizing everything when I only want access to the desktop in one screen and I want to keep

How to get instance of TForm from a Handle?

时光毁灭记忆、已成空白 提交于 2021-02-07 02:59:43
问题 I'm converting some functions into a DLL which relate to Windows 7 functionality. I can't pass a TForm through DLL, so I need to pass its handle instead. except, once I have that handle on the other side, how do I reconstruct it back into a TForm instance? Also, what's the appropriate way to pass the handle (HWND) through a Delphi DLL to be compatible to call from C# for example? If not possible, then I at least need to know how to change the color of a window using windows API only, no

Delphi XE2 TZipFile: replace a file in zip archive

China☆狼群 提交于 2021-02-07 02:32:17
问题 I'd like to replace a file (= delete old and add new) in a zip archive with the Delphi XE2/XE3 standard System.Zip unit. But there are no replace/delete methods. Does anybody have an idea how it could be achieved without needing to extract all files and add them to a new archive? I have this code, but it adds the "document.txt" once more if it's already present: var ZipFile: TZipFile; SS: TStringStream; const ZipDocument = 'E:\document.zip'; begin ZipFile := TZipFile.Create; //Zipfile:

Delphi XE2 TZipFile: replace a file in zip archive

半腔热情 提交于 2021-02-07 02:11:02
问题 I'd like to replace a file (= delete old and add new) in a zip archive with the Delphi XE2/XE3 standard System.Zip unit. But there are no replace/delete methods. Does anybody have an idea how it could be achieved without needing to extract all files and add them to a new archive? I have this code, but it adds the "document.txt" once more if it's already present: var ZipFile: TZipFile; SS: TStringStream; const ZipDocument = 'E:\document.zip'; begin ZipFile := TZipFile.Create; //Zipfile: