delphi-2010

How to show this splash screen for 3 seconds?

孤街醉人 提交于 2019-12-22 08:33:47
问题 I created my splash screen using the method mentioned here: http://delphi.about.com/od/formsdialogs/a/splashscreen.htm I need to show the splash screen for 3 seconds before showing the main form. Please help. Thanks. 回答1: Inside project file: program Project1; uses Forms, Unit1 in 'Unit1.pas' {Form1}, uSplashScreen in 'uSplashScreen.pas' {frmSplashScreen}; {$R *.res} begin Application.Initialize; Application.MainFormOnTaskbar := True; frmSplashScreen := TfrmSplashScreen.Create(nil); try

Can a Delphi generic class descend from its class argument?

房东的猫 提交于 2019-12-22 08:20:15
问题 I've been trying to define a generic, inheritable TSingleton class. Here's what I had in progress: TSingleton<RealClass, InheritsFrom : class> = class(InheritsFrom) strict private class var FInstance : RealClass; protected procedure InstanceInitialization;virtual; public destructor Destroy; override; class procedure Create; reintroduce; class function Instance : RealClass; class procedure InstanceFree; end; The goal was to be able to "insert" the singleton pattern in an inheritance tree. so

When and how should I obfuscate my Delphi code?

╄→гoц情女王★ 提交于 2019-12-22 07:59:09
问题 What should I know about code obfuscation in Delphi? Should I or shouldn't I do it? How it is done and is there any good tools (commercial/free) to automate it? 回答1: Why would you need to? As a whole Delphi does not decompile back, unlike .net, so, while decompilation is always a bit of a risk, Ive never found a decompiler that actually did it to a useful way, lots of areas got left as assembler and so on. If people want to rework your work, they can, no matter what, obfuscation or not, heck,

Json parse result from virustotal api

大憨熊 提交于 2019-12-22 07:07:26
问题 I was playing around with the virustotal api today while becoming back the result in this form : { "permalink" : "http://www.virustotal.com/file-scan/report.html?id=7b6b268cbca9d421aabba5f08533d3dcaba50e0f7887b07ef2bd66bf218b35ff-1304089592", "report" : [ "2011-04-29 15:06:32", { "AVG" : "Exploit_c.TVH", "AhnLab-V3" : "PDF/Exploit", "AntiVir" : "EXP/Pidief.UK", "Antiy-AVL" : "Trojan/win32.agent", "Avast" : "JS:Pdfka-gen", "Avast5" : "JS:Pdfka-gen", "BitDefender" : "Exploit.PDF-JS.Gen", "CAT

Json parse result from virustotal api

a 夏天 提交于 2019-12-22 07:07:08
问题 I was playing around with the virustotal api today while becoming back the result in this form : { "permalink" : "http://www.virustotal.com/file-scan/report.html?id=7b6b268cbca9d421aabba5f08533d3dcaba50e0f7887b07ef2bd66bf218b35ff-1304089592", "report" : [ "2011-04-29 15:06:32", { "AVG" : "Exploit_c.TVH", "AhnLab-V3" : "PDF/Exploit", "AntiVir" : "EXP/Pidief.UK", "Antiy-AVL" : "Trojan/win32.agent", "Avast" : "JS:Pdfka-gen", "Avast5" : "JS:Pdfka-gen", "BitDefender" : "Exploit.PDF-JS.Gen", "CAT

Delphi RTTI: Get property's class

旧街凉风 提交于 2019-12-22 05:57:09
问题 Using Delphi 2010 and RTTI, I know how to get the class type of an object and how to get/set the value and type of an object's properties, but how do you determine which class in the inheritance chain a property came from? I want to use the properties of a base class differently than the main class. Consider this code: TClassBase = class(TObject) published property A: Integer; end; TClassDescendant = class(TClassBase) published property B: Integer; end; procedure CheckProperties(Obj: TObject)

Handle file drop in TShellListView descendant

谁说胖子不能爱 提交于 2019-12-22 04:56:41
问题 I am attempting to create a descendant of TShellListView that accepts files dropped from Windows Explorer. I want to handle the drag/drop in my component definition without having to implement it in any of the applications that use the component (I've found examples of accepting files dropped from Windows Explorer, but all at the application / TForm level). I'm calling DragAcceptFiles() in my constructor, and I've defined a message handler for WM_DROPFILES. However, when I use this component

How to split the string in delphi

对着背影说爱祢 提交于 2019-12-22 04:55:35
问题 I just need to split a string like: "STANS", "Payment, chk#1", ,1210.000 into an array based on , . The result in the string list would be STANS Payment, chk#1 1210.000 回答1: Create a TStringList and assign your comma separated string to StringList.CommaText . This parses your input and returns the split strings as the items of the string list. StringList.CommaText := '"STANS", "Payment, chk# 1", ,1210.000'; //StringList[0]='STANS' //StringList[1]='Payment, chk# 1' //etc. 回答2: I wrote this

Why does OnMouseMove fire repeatedly when the mouse is not moving in D2010?

99封情书 提交于 2019-12-22 04:21:51
问题 I'm porting a Delphi 5 app to D2010, and I've got a bit of a problem. On one form is a TImage component with an OnMouseMove event that's supposed to update a label whenever the mouse is moved over the image. This worked just fine in the original app, but now the OnMouseMove event fires constantly whenever the mouse is over the image, whether it's moving or not, which causes the label to flicker horribly. Does anyone know what's causing this and how to fix it? 回答1: My psychic debugging sense

Freeware ZIP component for Delphi 2010/Delphi XE?

十年热恋 提交于 2019-12-22 04:16:24
问题 Do you know any free component, compatible with Delphi 2010 or XE to manage ZIP archives (actually, only reading archive contents and extracting files required)? Please no betas. I thought about ZipForge from ComponentAce, but it's free only for personal use. No software distribution allowed. 回答1: You can get the TurboPower Abbrevia for 2010 from: http://tpabbrevia.sourceforge.net/ 回答2: you can take a look at this if you like 7zip 回答3: If you only need decoding (developed for Delphi 2007, not