delphi

Delphi to Visual basic conversion utility

Is there any code conversion tool for converting Delphi to Visual Basic? Please advice. Thank you very much. ...

dbGo or dbExpress for Delphi 2010 with Microsoft SQL Server

Hi Everyone, I am migrating to Delphi 2010 and I am using Microsoft SQL 2000 (Planning on upgrading to SQL2008). I have been using BDE all along and wondering if I should use dbGo (ADO) or dbExpress with my future application. Can someone explain to me the pros and cons for using either one? Thanks a lot. ...

Delphi: determine actual type of a generic?

Is there any way to determine the type of a variable passed as an argument to a method? Consider the class: TSomeClass = class procedure AddToList<T: TDataType; U: TListClass<T>>(Element: T; List: U); end; with the method implementation procedure TSomeClass.AddToList<T, U>(Element: T; List: U); begin if Element is TInt then L...

Relative path of a given file from a service application in Delphi

I have a problem loading a file, as I'm passing a relative path to the function FileExists(Filename: String) and it's returning false, that is, it does not find the file in the directory that I pass. I have a file named Template.html in the D:\Programming\Delphi\Projects\SendMail directory, and a service written in Delphi whose .EXE is...

Delphi: Proper time to subclass, and restore, a control?

What is the correct place/time to start subclassing a control? What is the proper time to restore the original window proc? Right now i subclass during form creation: procedure TForm1.FormCreate(Sender: TObject); begin FOldPanel1WindowProc := Panel1.WindowProc; Panel1.WindowProc := Panel1WindowProc; end; and i restore the subc...

How to get the size of an image in bytes with Delphi?

Hi dudes, my app has 3 controls: TThumbnailList (image viewer from TMS components), TImage, and TLabel. I wish that when I drag an image from TThumbnailList to TImage, and drop it, the TLabel object shows the size in bytes for that image. How do I get this? Thanks in advance. procedure TForm1.AssignImage; begin //tl: TThumbnailList ...

Delphi/pascal: overloading a constructor with a different prototype

I'm trying to create a child class of TForm with a special constructor for certain cases, and a default constructor that will maintain compatibility with current code. This is the code I have now: interface TfrmEndoscopistSearch = class(TForm) public /// original constructor kept for compatibility constructor Create(AO...

Strange GAC error in ASP.Net application

I'm experiencing a strange failure when trying to view my website under IIS. If I create a new ASP.Net web site application, don't modify it at all and run it (F5) the web page shows up with the error: Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review t...

How Do I Add A TLabel To The Menu Bar in Delphi?

I use Beyond Compare (a great program), and was very impressed when it displayed a "New Version Available" label on its Menu Bar. I clicked on it, up popped an install new version box, it installed, the program restarted itself and there was the new version and no more label. I thought that was a great feature. The label is there promin...

How to encode a datetime in delphi

Hi There, I know how to use encodedate in Delphi to encode individual YY, MM and DD into a datetime field or use encodetime to encode individual HH, SS, MM and MS into datetime field but is there a way to specify both date and time into a datetime field? Coz with encodedate I cannot specify the time and with encodetime I cannot specify...

Delphi: generics and 'is'-operator problem

Based on an earlier post, I've written the following code. Please excuse the verbosity of this post. I believe it's better for all parties to have the full code available to test and comment on. program sandbox; {$APPTYPE CONSOLE} uses SysUtils, Generics.Collections; type TDataType = class // Stuff common to TInt and TStr ...

Use SSL with Delphi yet still having a single exe

Hi, We use Indy and we need SSL eMail support in our app., however we need to have our application in a single .Exe. We know that the default Indy handler requires to have the dlls in the path. Extracting the Dlls from one of the EXE's resources would be the last resort. Any better ideas? ...

Error on getting AVI file duration

I am using VFW unit from JEDI wrapper on WinAPI. The code I am writing is intended to search user drives and detect warez. We do MP3, WMA and some graphic file search. Now we want to detect illegal movies. I want to open AVI file, read some details from it and close it. I have the following code: uses WFV; //from JEDI api wrappers pro...

Delphi for .NET does not find shared files in the .NET library search directories ("[DCC Error] F1026 File not found)

I have been trying to track down a problem with an installation of RAD Studio 2007 for some time. When compiling an ASP.NET application build with the .NET personability, I get an "[DCC Error] F1026 File not found error, where it reports that it cannot find a particular .dcuil file. The file that is referenced in this error message is ...

How can activate a glass effect (windows Vista/7) in a console application using Delphi

As I can activate the glass effect on my console applications. I am using Windows 7 and Delphi 2010. I found this application so it should be possible. Thanks. ...

How can I print SelectedRows in DBGrid using Rave Report ?

To report current record in dataset I have made (one record by page): RvSystem1.SystemPrinter.FirstPage := DataSet.RecNo; RvSystem1.SystemPrinter.LastPage := DataSet.RecNo; So, how we can report only selected records in DataSet when all records appears in the same page. Something like: RvProject1.SelectReport('Report1'); for I := 0 t...

Working with IME names in Delphi

Hi, Delphi TScreen object has a collection that accepts IME names. And the TControl offers SetIMEName method. Are these IME names constant? Are they same as ISO language names? Platform: Windows XP. Thanks, Pavan. ...

copy file in a thread

I am trying to write to copy a file by invoking a separate thread. Here is my form code: unit frmFileCopy; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, StdCtrls; type TForm2 = class(TForm) Button3: TButton; procedure Button3Click(Sender: TObject); proc...

Delphi 2010 OXMLDOM

I'm migrating my Delphi 7 app to Delphi 2010. We used the Open XML (from http://www.philo.de/). In Delphi 2010 it seems to be already built in. In the documentation it says so (ms-help://embarcadero.rs2010/rad/Using_the_Document_Object_Model.html) "and the unit for the Open XML implementation is OXMLDOM" But I can not find any OXMLDOM...

Print FastReport directly

I'm using FastReport in Delphi Win32. When a FastReport is called, it is previewed before you can print it. The user sometimes needs to print a series of reports. It's a PITA to preview then print each one separately. How can I queue the reports and send them directly to the default printer? ...