Delphi

How to Schedule a task programmatically

这一生的挚爱 提交于 2021-02-06 04:35:52
问题 How can I schedule a task using delphi 7 like Google updater? I'm not using the registry because it gets detected by Kaspersky antivirus as a false alarm. Anything I add in the registry as a start-up item gets detected as a trojan so I decided to use task schedule 回答1: The following piece of code shows how to delete and create the task which will run the application at system startup with system privileges. It uses the following command line: However the Task Scheduler since Windows Vista

Delphi programs blocked by antivirus programs [closed]

爱⌒轻易说出口 提交于 2021-02-05 20:48:15
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . Improve this question I have a piece of code that is trying to write to disk many files in one second. However, it fails wince I have installed Kaspersky Anrivirus 2011. Stream:= TFileStream.Create(sName, fmCreate); The code totally worked with Kaspersky 2010 and also works with

What are the pros and cons of using interfaces in Delphi?

对着背影说爱祢 提交于 2021-02-05 14:51:47
问题 I have used Delphi classes for a while now but never really got into using interfaces. I already have read a bit about them but want to learn more. I would like to hear which pros and cons you have encountered when using interfaces in Delphi regarding coding, performance, maintainability, code clearness, layer separation and generally speaking any regard you can think of. Thanks and best regards 回答1: All I can think of for now: Pros: Clear separation between interface and implementation

What are the pros and cons of using interfaces in Delphi?

痴心易碎 提交于 2021-02-05 14:51:42
问题 I have used Delphi classes for a while now but never really got into using interfaces. I already have read a bit about them but want to learn more. I would like to hear which pros and cons you have encountered when using interfaces in Delphi regarding coding, performance, maintainability, code clearness, layer separation and generally speaking any regard you can think of. Thanks and best regards 回答1: All I can think of for now: Pros: Clear separation between interface and implementation

How to get the user input from the frame and save into txt file?

烈酒焚心 提交于 2021-02-05 12:32:02
问题 My programs run like this: I have a form with an add button, save button, and tabcontrol. When the add button in the form is clicked, the tabcontrol will add more tabitem. And the tabitem is basically added from myframe which includes users key-in value in a TEdit. What I want to achieve is to print all the user input from the frame to a txt file when I click on the save button(tick) in the form. This is my code in form. Can anyone please give me some hint? My frame Image: My form Image: My

Delphi programs are detected as false-positive by ClamAV

江枫思渺然 提交于 2021-02-05 12:31:06
问题 My Delphi XE2 programs are always detected as containing a virus on Jotti by ClamAV, while other virus scanners do not detect anything: AFAIK, ClamAV is often used with mail servers. So do I have to fear that end-users will get a virus warning when sending my program by e-mail (even when zipped)? How can this be avoided? 回答1: This is a Possibly Unwanted Applications according to them and you can't report PUAs on their false positive upload form. Their contacts page shows two possible avenues

Parsing JSON Array in Delphi

亡梦爱人 提交于 2021-02-05 12:26:22
问题 I have a similar problem to Delphi parse JSON array or array, but the answers do not fit my need. I have this JSON: [ { "total": "9", "page": "9", "records": "99", "rows": [ { "id": "62316", "titleId": "47243", "subject": [ "000607", "000607_", "001727" ], "keyFeatures": [ "AI", "URL" ] }, { "id": "66", "titleId": "47243", "subject": [ "000607", "000607_", "001727" ], "keyFeatures": [ "KK" ] } ], "suggestion": "90" } ] I would like to write all f.e. "keyFeatures" of every "id" in a memo, like

Parsing JSON Array in Delphi

柔情痞子 提交于 2021-02-05 12:25:26
问题 I have a similar problem to Delphi parse JSON array or array, but the answers do not fit my need. I have this JSON: [ { "total": "9", "page": "9", "records": "99", "rows": [ { "id": "62316", "titleId": "47243", "subject": [ "000607", "000607_", "001727" ], "keyFeatures": [ "AI", "URL" ] }, { "id": "66", "titleId": "47243", "subject": [ "000607", "000607_", "001727" ], "keyFeatures": [ "KK" ] } ], "suggestion": "90" } ] I would like to write all f.e. "keyFeatures" of every "id" in a memo, like

IdHTTP.Post - No progress for me to display in a progressbar

前提是你 提交于 2021-02-05 11:59:47
问题 I am trying to display the progress of a POST call from my TIdHTTP component. procedure TForm1.IdHTTP1Work(ASender: TObject; AWorkMode: TWorkMode; AWorkCount: Int64); begin ProgressBar1.Position := AWorkCount; end; procedure TForm1.IdHTTP1WorkBegin(ASender: TObject; AWorkMode: TWorkMode; AWorkCountMax: Int64); begin Progressbar1.Max := AWorkCountMax; end; However when I debug this, I land 2 times on the .Max = AWorkCountMax; line, and the first time the value is 65, and the 2nd time the value

delphi TStringGrid and right mouse button

南楼画角 提交于 2021-02-05 11:12:31
问题 I am using Delphi 10.1 Berlin to make a Multi-Device application. I have a TStringGrid in order to list some data from a query. I also have a popup menu (edit, delete, ...), but in order to edit/delete an item I have to click on a cell using the left mouse button. Is it possible to "select a row" using only the right button before showing the popup menu? I tried: procedure TForm1.StringGrid1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin if Button =