How can I search for Delphi documentation? [closed]

You can navigate to the front page of the Embarcadero documentation and search from there. The link is: http://docwiki.embarcadero.com/RADStudio/en/Main_Page Note that no version is included in the link. If you navigate to that link then the site will re-direct you to a version specific URL for the latest release. In this case, as I write … Read more

Why does Delphi’s compilation speed degrade the longer it’s open, and what can I do about it?

If you build your application, here are some tricks to speed up the process: Erase all *.dcu before the build (del *.dcu /s); Run a good defragmenter on your corresponding hard drive; Put most of your source files in the same directory, and try to leave the IDE and Project library paths as short as … Read more

How hard is it to migrate a project from Delphi 7 to Delphi XE?

The only real problem is conversion to Unicode. You should learn how Unicode support is implemented in Delphi – start from Marco Cantu White Paper: Delphi and Unicode It is impossible to estimate the amount of work required to upgrade old applications to Unicode without knowing the actual code. If you were using string types … Read more

What are good uses for class helpers?

I’m using them: To insert enumerators into VCL classes that don’t implement them. To enhance VCL classes. To add methods to the TStrings class so I can use the same methods in my derived lists and in TStringList. TGpStringListHelper = class helper for TStringList public function Last: string; function Contains(const s: string): boolean; function FetchObject(const … Read more

TThread.resume is deprecated in Delphi-2010 what should be used in place?

Charles if do you read the code of TThread class , do you find the answer. TThread = class private type .. .. .. public constructor Create(CreateSuspended: Boolean); destructor Destroy; override; procedure AfterConstruction; override; // This function is not intended to be used for thread synchronization. procedure Resume; deprecated; // Use Start after creating a … Read more

What’s the simplest way to call Http POST url using Delphi?

Using Indy. Put your parameters in a StringList (name=value) and simply call Post with the URL and StringList. function PostExample: string; var lHTTP: TIdHTTP; lParamList: TStringList; begin lParamList := TStringList.Create; lParamList.Add(‘id=1’); lHTTP := TIdHTTP.Create; try Result := lHTTP.Post(‘http://blahblahblah…’, lParamList); finally lHTTP.Free; lParamList.Free; end; end;

Simple Thread Sample Delphi

Yup, you declare a new type which inherits from TThread: TMyWorkerThread = class(TThread) end; Then you add a function override for Execute(): TMyWorkerThread = class(TThread) public procedure Execute; override; end; That procedure will be called when you start your thread. It will be executed in parallel with your main program. Let’s write it. procedure TMyWorkerThread.Execute; … Read more

Is there a trick for using TSQLMonitor with a TSQLConnection that uses the new ODBC dbExpress driver?

Try this out: procedure TForm2.Button1Click(Sender: TObject); begin try Connect; SQLMonitor1.SQLConnection := SQLConnection1; SQLMonitor1.Active := True; ExecuteQueries; SQLMonitor1.SaveToFile(‘D:\\Log.txt’); except on E: Exception do ShowMessage(‘Exception ocurred!: ‘ + E.Message); end; end; procedure TForm2.Connect; begin SQLConnection1 := TSQLConnection.Create(nil); SQLConnection1.ConnectionName := ‘odbcinterbaseconnection’; SQLConnection1.LoginPrompt := False; SQLConnection1.LoadParamsOnConnect := True; SQLConnection1.Connected := True; end; procedure TForm2.ExecuteQueries; var Query: String; begin try … Read more