delphi-2010

D2010 compiled line count discrepancy

天涯浪子 提交于 2019-12-05 02:06:28
When building a project there are two places where source line count is reported: On the compile progress dialog Under Project | Information In Delphi 2007 these two numbers were identical for the project we are building. In Delphi 2010 these two numbers are wildly different. The (1st) count is larger by a count of 1 million lines or 40%. The (2nd) count is close enough to the Delphi 2007 count to be satisfied the correct files are being built accounting for code changes in porting to D2010. Alternative versions of source files simply do not exist in the build environment. So the question is:

How can I make a form transparent according to a PNG image?

≡放荡痞女 提交于 2019-12-05 00:45:39
问题 I have a PNG image that uses transparency (it is actually a circle with gradient effect from black in the middle, to transparent on the margins). I am putting this on a form using TImage . I set TForm1.Color and the TForm1.TransparentColorValue to the same value and TForm1.TransparentColor:=true . Now, when I run the program the gradient part of the image is displayed with the color of the form. What I am looking for is to enable the transparency of the PNG image using the transparent form

Problem with Indy IdHttp Post in Delphi 2010

99封情书 提交于 2019-12-04 23:54:06
问题 I have problem with Indy IdHttp Post method. Function CallRpc() compiled with Delphi 2007 works fine but same code compiled with Delphi 2010 raises exception. What do I have to consider when I change Delphi 2007 Indy TIdHttp to Delphi 2010 Indy TIdHttp? function CallRpc(const sURL, sXML: string): string; var SendStream : TStream; IdHttp : TIdHttp; begin SendStream := TMemoryStream.Create; IdHttp := TIdHttp.Create(nil); try IdHttp.Request.Accept := '*/*'; IdHttp.Request.ContentType := 'text

Connection timed out error when using SMTP to send emails with Delphi?

人盡茶涼 提交于 2019-12-04 23:49:32
问题 how to send an email address with delphi 2010 such as ( verefication email, password lost, or any html/plain text emails. i tried with the following code but i get EIdSocket Eroor with message 'Socket Error #10060 Connection Timed Out' when trying to send the mail. procedure TForm5.btnSendMailClick(Sender: TObject); begin //setup SMTP smtppass := ed_IdVerification.Text; SMTP.Host := 'smtp.google.com'; // Controle a distance SMTP.Port := 465; smtp.Username := 'hetallica69@gmail.com'; smtp

No breakpoints when Remote debugging with Delphi 2010 - so stuck on Delphi 7

你离开我真会死。 提交于 2019-12-04 23:09:03
问题 I've come back to looking at remote debugging with Delphi 2010 after my initial investigation last August. I've made sure that D2010 has updates 4&5 and that the remote debugger is the latest from the Embarcadero wesite. Following the very useful instructions here I can load the remote process and run it fine, but I cant use breakpoints. The RSM and EXE files are together in the remote directory. Is there anything I should check? Can I load the symbol table manually? There seem to be no

Delphi 2010 remote debugging - unable to get breakpoints working

喜夏-厌秋 提交于 2019-12-04 18:33:33
问题 I recently posted this question about my inability to get Delphi 2010 working with remote debugging. I have not had any success and decided to post up a simple step-by-step test technique that might highlight what I'm doing wrong. THIS IS REALLY IMPORTANT to me - I've used Delphi since V1.0 and earn my living from it. Being stuck like this is a pain and its keeping me on Delphi 7. Anyway, here goes. Ensure that Delphi 2010 has updates 4&5. Fire up Delphi 2010, then File | New | VCL Forms App.

How do I send and handle message between TService parent thread and child thread?

廉价感情. 提交于 2019-12-04 18:24:42
I am using Delphi 2010 to create a Windows service that will monitor several registry keys, and perform an action when a change occurs. I am using RegMonitorThread from delphi.about.com, and my issue is that my main service thread never receives the message that is sent from the TRegMonitorThread. type TMyService = class(TService) procedure ServiceExecute(Sender: TService); procedure ServiceShutdown(Sender: TService); procedure ServiceStart(Sender: TService; var Started: Boolean); private function main: boolean; { Private declarations } public function GetServiceController: TServiceController;

convert function to delphi 2009/2010 (unicode)

大憨熊 提交于 2019-12-04 18:24:24
I'm slowly converting my existing code into Delphi 2010 and read several of the articles on Embarcaedro web site as well as Marco Cantú whitepaper. There are still some things I haven't understood, so here are two functions to exemplify my question: function RemoveSpace(InStr: string): string; var Ans : string; I : Word; L : Word; TestChar: string[1]; begin Ans := ''; L := Length(InStr); if L > 0 then begin for I := 1 to L do begin TestChar := Copy(InStr, I, 1); if TestChar <> ' ' then Ans := Ans + TestChar; end; end; RemoveSpace := Ans; end; function ReplaceStr(const S, Srch, Replace: string)

Client-Server application writing in delphi

旧街凉风 提交于 2019-12-04 14:10:24
问题 What is the best way to write a client-server application under delphi? I know there's a DataSnap technology, but it's not in Professional version. Do You have any experience that You can share? 回答1: This is fairly wide open question, as it can depend on your database decision. DataSnap really allows for N-Tier solutions, if your looking for Client Server you have most everything you need in the professional version depending on the Database Choice. For Client Server: Client Server

Restart Delphi Application Programmatically

眉间皱痕 提交于 2019-12-04 12:22:46
问题 It should not be possible to run multiple instances of my application. Therefore the project source contains: CreateMutex (nil, False, PChar (ID)); if (GetLastError = ERROR_ALREADY_EXISTS) then Halt; Now I want to restart my application programmatically. The usual way would be: AppName := PChar(Application.ExeName) ; ShellExecute(Handle,'open', AppName, nil, nil, SW_SHOWNORMAL) ; Application.Terminate; But this won't work in my case because of the mutex. Even if I release the mutex before