delphi

Handling a Unicode String in Delphi Versions <= 2007

Background: This question relates to versions of Delphi below 2009 (ie without Unicode support built in). I have a specification that requires me to transmit a Unicode encoded string over a TCP connection but I do not have Delphi 2009. Question Is there a single function or very small library (I don't need too much bulk) that I can use...

Generics: What's a "CONSTRUCTOR constraint"?

I made a custom TObjectList descendant designed to hold subclasses of a base object class. It looks something like this: interface TMyDataList<T: TBaseDatafile> = class(TObjectList<TBaseDatafile>) public constructor Create; procedure upload(db: TDataSet); end; implementation constructor TMyDataList<T>.Create; beg...

Recommend color picker utility with support for Delphi color codes

I'm looking for a free color picking application with support for Delphi color codes. - Something like the ColorPic would be perfect. (ColorPic colour codes aren't compatible with Delphi) - Support for color sets would be a bonus. Please let me know if you have any recommendations. [edit] To clarify, I'm looking for a standalone color...

How can I burn CD/DVD from delphi2007 win32

Is there any good lib to enable me to burn CD/DVD from Delphi 2007 win32 ? Thanks ...

How do I make a generic object list work from a specific base class?

TMyDataList<T: TBaseDatafile, constructor> = class(TObjectList<TBaseDatafile>) public constructor Create; procedure upload(db: TDataSet); end; I read in a blog post (I don't remember where now) that this is the way to declare a generic-based class with a specific base type for the generic object. And the compiler ...

For Delphi IDE, Functions list in code editor like in Visual Studio

For Delphi IDE, Is there any tool/expert to know the name of the function where the cursor is, without scrolling the code editor? ...

Read Text file with dos null byte

I have a text file with dos elements - hex(00) for exampel. I need to read it and convert it. Have tried to use utf8toansi, but this removes the whole line with hex(00). Are there any way to convert to text in the whole file ? I am using win32, RadStudio2007, Delphi. ...

Do I have to use Disable/EnableControls when using Locate in a TClientDataSet?

Or does it handle it by default? ...

Interesting stack overflow! compiler bug???

i wonder if i've found a compiler bug? i was removing some old code from my app and now i get stackoverflow at "begin" (see code & disassembly below). procedure TfraNewRTMDisplay.ShowMeasurement; var iDummy, iDummy2, iDummy3:integer; begin // STACK OVERFLOW BEFORE MY CODE STARTS iDummy:=0; iDummy2:=0; case iDummy2 of 1:...

Delphi - Displaying All Image Format

Hello everyone, Im a newbie programmer in Delphi. I need help, I have a small project which I need to display all kind of image format. Please suggest what should I do or any component in delphi that support all image format? thanks for the help in advance. ...

Displaying splash screen in Delphi when main thread is busy

I'd like to display splash screen while the application is loading. However some 3rd party components block main thread during initilization for several seconds, which causes all forms not to update. Is it possible to have splash screen with own thread so it would update also when main thread is busy? The application is win32 and Delphi...

How can I determine the connection method of a Crystal XI report at runtime, before logging in?

In my (Win32) application, I am displaying Crystal Reports. I set the login information at runtime. However, Crystal kindly decided to refer to the database name by several different names, depending on how the report connects. For instance, if the report connects through an ODBC connection, then it is called "Data Source", but if it ...

In Delphi, can I invoke an instance method from a class method with same name?

Is it possible in Delphi to have a class method invoke an inherited instance method with the same name? For example, I tried something like this: //... Skipped surrounding class definitions function TSomeAbstractDialogForm.Execute: Boolean; begin Result := ShowModal = mrOk; end; I had a couple of specialized dialog classes that inh...

Local WideString variable debug error "Int3 DbgBreakPoint"

In C++Builder, I wrote the following code (in Button1Click handler), When I run in debug mode, I get the "Int3 DbgBreakPoint" (Stack corrupted?). This doesn't happen for AnsiSting (Maybe reference counting). WideString boshluq; boshluq=L" "; Is this normal? What do you suggest me to fix this code? ...

String truncation error in Delphi DBExpress/Firebird paramatised queries

I have a query in Delphi using DBExpress TSQLQuery that looks like so ActiveSQL.sql.add('SELECT * FROM MYTABLE where MYFIELD=(:AMYFIELD) '); ActiveSQL.ParamByName('AMYFIELD').AsString := 'Some random string that is to long for the field'; ActiveSQL.Open; If I run it, when it executes the open command I get the following exceptio...

Form designer inconsistent in control display style for updated project

I've got a project that I started in Turbo Delphi, which I recently updated to D2009, and I've noticed a bit of a quirk in the form designer. All the old forms have a Win98 style applied to them. The buttons are gray with sharp square edges, for example. But any new form I've created since the upgrade displays its controls in WinXP styl...

MD5 Hashing in Delphi 2009

In borland delphi 7 and even in delphi 2007 everything worked, but in delphi 2009 it just returns the wrong hash! I use wcrypt2 script (http://pastebin.com/m2f015cfd) Just have a look: string : "123456" hash: Delphi 7 : "e10adc3949ba59abbe56e057f20f883e" - real hash. Delphi 2007 : "e10adc3949ba59abbe56e057f20f883e" - real hash too....

Background music in delphi application

Any ideas of how to make it? I think the Background Music Component For Delphi is a excellent choice, but damn, I can't find it anywhere to download, even a trial.. the homepage is down and all the download sites are using the original download link (homepage). ...

Has anyone experience with porting a D2007 + TntControls application to D2009?

I have a rather large (freeware) project written with Delphi 2007 which is using both the TntUnicodeControls and the TntLXControls library and I'm planning to move to Delphi 2009. Unfortunatly I'm using those libraries everywhere in my project: Replacement for VCL controls to provide Unicode capability Win32 API wrappers (mostly for c...

How is the best way to write a SOAP 1.2 Client with Delphi Win32

So far, no Delphi version supports SOAP 1.2 clients or server. I have tried for weeks to make it works, but every time a new problem, with VS/C# I could do the same, and make works in 3 days, but I need to do with Delphi 2009. "I write a new version using Rem Objects SDK,", but the result was not better that I had with Delphi SOAP libr...