delphi-xe2

How to implement the scanline access of TBitmap correctly?

帅比萌擦擦* 提交于 2021-02-08 15:26:10
问题 I am trying to access the scanline of a Bitmap according to an article on Embarcadero. Using scanlines like for y := 0 to n do begin line := bitmap.scanline [y]; for x := 0 to n do line [x] := value; I have implemented before. I noticed that accessing a scanline takes relatively much time and the article mentioned above offers a solution to that. I am not able to implement it correctly. My code is: unit SCTester; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics,

Opening TWebBrowser link in default browser

给你一囗甜甜゛ 提交于 2021-02-07 14:33:22
问题 My application displays a small banner loaded from the web in a TWebBrowser control. This banner is actually a HTML page including an image; when the users click the image it takes them to the promotional campaign we're currently running. The bad thing here is that when clicking the link in TWebBrowser, the campaign page is opened in Internet Explorer, not in their default browser. I know this happens because TWebBrowser is a IE-based control, but is there a way to open the link in users'

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:

Delphi XE2 TZipFile: replace a file in zip archive

点点圈 提交于 2021-02-07 02:06:25
问题 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:06:23
问题 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:

How do I instantiate a class from its TRttiType?

自古美人都是妖i 提交于 2021-02-06 11:09:49
问题 I want to create a form given its class name as a string, which has been asked about before, but instead of calling GetClass , I want to use Delphi's new RTTI feature. With this code, I've got a TRttiType , but I don't know how to instantiate it. var f:TFormBase; ctx:TRttiContext; lType:TRttiType; begin ctx := TRttiContext.Create; for lType in ctx.GetTypes do begin if lType.Name = 'TFormFormulirPendaftaran' then begin //how to instantiate lType here? Break; end; end; end; I've also tried

How do I instantiate a class from its TRttiType?

时间秒杀一切 提交于 2021-02-06 11:05:05
问题 I want to create a form given its class name as a string, which has been asked about before, but instead of calling GetClass , I want to use Delphi's new RTTI feature. With this code, I've got a TRttiType , but I don't know how to instantiate it. var f:TFormBase; ctx:TRttiContext; lType:TRttiType; begin ctx := TRttiContext.Create; for lType in ctx.GetTypes do begin if lType.Name = 'TFormFormulirPendaftaran' then begin //how to instantiate lType here? Break; end; end; end; I've also tried

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

Can I make my Delphi App start at a specific time (like 12:00AM), without the application running?

淺唱寂寞╮ 提交于 2021-02-05 08:46:28
问题 I saw an installed application, that feeds some XML data from the vendor's website and displays it in the Main Form window. Simple stuff, I suppose, but whgat I noticed was that, even when I close the Application in the system tray, tomorrow morning (at exactly 12:00AM) it pops ups again! This is so cool. I am not sure that it was written in Delphi, probably some .NET IDE or somehting. Can Delphi XE2 achieve this? If so, how can I get that to work? 回答1: Windows can achieve this: