Delphi

External Program running in different user desktop

对着背影说爱祢 提交于 2021-01-05 06:38:16
问题 I am trying to execute an external program under SYSTEM level and I applied this method (where I only changed the CreateProcessAsSystem('c:\windows\system32\cmd.exe'); to the path of the application I wanted to execute) and it works perfectly as expected only if there is one user logged into the pc. Eg. I have 2 users ( user1 and user2 ) and both users are logged in ( user1 first and then user2 ). Then, I run the program in user2 and my external program supposed to appear on user2 's desktop.

External Program running in different user desktop

女生的网名这么多〃 提交于 2021-01-05 06:38:04
问题 I am trying to execute an external program under SYSTEM level and I applied this method (where I only changed the CreateProcessAsSystem('c:\windows\system32\cmd.exe'); to the path of the application I wanted to execute) and it works perfectly as expected only if there is one user logged into the pc. Eg. I have 2 users ( user1 and user2 ) and both users are logged in ( user1 first and then user2 ). Then, I run the program in user2 and my external program supposed to appear on user2 's desktop.

delphi(假三层之数据访问层)(第一天)

佐手、 提交于 2021-01-04 08:34:11
本论文主要是通过三天来讲解三层的结构,今天是第一天,先讲解一下delphi下的Models层,我主要封装了两个查询得到数据集的函数,主要是通过在表示层上创建的数数据集控件传递进来,通过业务逻辑对语句的处理进行操作数据集,最后提交数据集的数据到数据库中去,进而想成delphi中的假三层,这样做能够独立于业务逻辑层和数据访问层,其他的都可以调用这两层,其中业务逻辑层,明天再讲,逻辑层写的不怎么好,个人觉得还是数据访问层封装方法封装通用性程度高一点。例如:TADOQuery,TADOTable数据集控件,通过一层一层的传递。 下面直接上代码: unit UnitModels; interface uses SysUtils, Classes, DB, ADODB; type TModel = class(TDataModule) conConnection: TADOConnection; procedure DataModuleCreate(Sender: TObject); private { Private declarations } public { Public declarations } FConnection : TADOConnection; // 返回影响的行数 function SqlExec(const ASql: string;var AQry:

Delphi TEdit in iOS - turn off auto-caps on a per TEdit basis

流过昼夜 提交于 2021-01-01 06:39:37
问题 Currently, the iOS TEdit when it brings up the Keyboard, will have the keyboard in Caps for first letter. I would like to turn off Keyboard auto going into Caps for first letter for specific TEdit. Some TEdits I would want to retain first letter as capitalized, eg Names. I can't use the TEdit.CharCase feature as it forces all input in TEdit to lowercase. What I want is that user can Type in Mixed Case if they choose to but the Keyboard has to be in lowercase when TEdit first comes into focus.

Delphi TEdit in iOS - turn off auto-caps on a per TEdit basis

只谈情不闲聊 提交于 2021-01-01 06:39:36
问题 Currently, the iOS TEdit when it brings up the Keyboard, will have the keyboard in Caps for first letter. I would like to turn off Keyboard auto going into Caps for first letter for specific TEdit. Some TEdits I would want to retain first letter as capitalized, eg Names. I can't use the TEdit.CharCase feature as it forces all input in TEdit to lowercase. What I want is that user can Type in Mixed Case if they choose to but the Keyboard has to be in lowercase when TEdit first comes into focus.

How to access TBitmap pixels directly in FMX2 (TBitmap.ScanLine replacement)?

三世轮回 提交于 2020-12-30 19:36:22
问题 The FMX.Types.TBitmap class has the ScanLine property in FMX (FireMonkey), but it seems this property was removed, and is missing in FMX2 (FireMonkey FM2). Is there any workaround ? How do we supposed to access TBitmap content directly in FMX2 ? 回答1: For direct access you are expect to use the Map method. The documentation includes a number of examples, such as FMX.AlphaColorToScanline: function TForm1.TestAlphaColorToScanline(ABitmap: TBitmap; start, count: integer): TBitmap; var bitdata1,

How to access TBitmap pixels directly in FMX2 (TBitmap.ScanLine replacement)?

你离开我真会死。 提交于 2020-12-30 19:29:42
问题 The FMX.Types.TBitmap class has the ScanLine property in FMX (FireMonkey), but it seems this property was removed, and is missing in FMX2 (FireMonkey FM2). Is there any workaround ? How do we supposed to access TBitmap content directly in FMX2 ? 回答1: For direct access you are expect to use the Map method. The documentation includes a number of examples, such as FMX.AlphaColorToScanline: function TForm1.TestAlphaColorToScanline(ABitmap: TBitmap; start, count: integer): TBitmap; var bitdata1,

Dynamically making indy use TLSv1.2

帅比萌擦擦* 提交于 2020-12-30 08:50:08
问题 GitHub has stopped supporting TLS v1.0 and v1.1 (https://githubengineering.com/crypto-deprecation-notice/), so my code no longer wants to download from it. I have checked and it seems I need to make Indy use TLS v1.2, as stated here: Using Indy 10 IdHTTP with TLS 1.2. I have already updated the OpenSSL DLLs to the latest from http://indy.fulgan.com/SSL/, and Indy seems to load them fine, but I still get an error. The error I get: How can I make Indy use TLS v1.2 if I dynamically create Indy

TArray<Byte> VS TBytes VS PByteArray

假装没事ソ 提交于 2020-12-29 14:21:26
问题 Those 3 types are very similar... TArray is the generic version of TBytes. Both can be casted to PByteArray and used as buffer for calls to Windows API. (with the same restrictions as string to Pchar). What I would like to know: Is this behavior "by design" or "By Implementation". Or more specifically, could it break in future release? //Edit As stated lower... What I really want to know is: Is this as safe to typecast TBytes(or TArray) to PByteArray as it is to typecast String to PChar as

TArray<Byte> VS TBytes VS PByteArray

二次信任 提交于 2020-12-29 14:15:10
问题 Those 3 types are very similar... TArray is the generic version of TBytes. Both can be casted to PByteArray and used as buffer for calls to Windows API. (with the same restrictions as string to Pchar). What I would like to know: Is this behavior "by design" or "By Implementation". Or more specifically, could it break in future release? //Edit As stated lower... What I really want to know is: Is this as safe to typecast TBytes(or TArray) to PByteArray as it is to typecast String to PChar as