delphi

HTML or RTF?

In my Delphi program I want to display some information generated by the application. Nothing fancy, just 2 columns of text with parts of words color-coded. I think I basically have two options: HTML in a TWebbrowser RTF in a TRichEdit. HTML is more standard, but seems to load slower, and I had to deal with The Annoying Click Sound. ...

Anonymous Record constructors in delphi

Is it possible to use records as a method parameter, and call it without implicitly declaring an instance of said record? I would like to be able to write code like this. type TRRec = record ident : string; classtype : TClass; end; procedure Foo(AClasses : array of TRRec); then calling the method like this or something s...

Passing parameters to a delphi TFrame

To avoid singletons and global variables I'd like to be able to pass parameters to a TFrame component. However since a TFrame normally is included on form at design time it is only possible to use the default constructor. The parent form can of course set some properties in the OnCreate callback after the TFrame has been created. Howeve...

Storing SQL field names and general SQL usage with Delphi

I'm starting to write my first Delphi application that connects to an SQL database (MySQL) using the ADO database components. I wondered whether there was any best way of storing the names of the fields in the database for easy reference when creating SQL queries later on. First of all I made them a simple constant e.g. c_UserTable_Us...

Need in SQL parser on Delphi

Does anybody know about good SQL parser with sources, written in Delphi? I need in parsing SQL commands (with all new features of Firebird 2.5) into object structure. ...

How many people have abused your 'with source' purchase option?

I'm interested in finding something out. In Delphi the default since the begining when buying components has been to be able to purchase them with source (even if it might be a slightly more expensive option). This made sense in Delphi for a number of reasons, firstly Borland led the way by providing the full source of the VCL with eve...

How can I display a transparent PNG on Delphi 2007?

The TImage control doesn't support PNG. Is there some third party component that will? Thanks! ...

How do I create an Active X control for use in Internet Explorer 7+?

I'm using Delphi 2007 and I am looking for some resources and best practices for writing an ActiveX control for embedding within Internet Explorer 7.0 (and higher). My goal with this ActiveX control is to be able to retrieve information about which websites the user is visiting, and the type of connection (e.g. HTTPS, HTTP, FTP, etc). I...

Delphi and .NET. Using Visual Studio

Hi, I've got an old project written in Delphi 4. I'm looking for a way to: use that code with minimal changes from within .NET use other .NET assemblies from that Delphi code use Visual Studio to work on the solution which will contain Delphi project and C# projects. Is that possible? What will i need for that? Thanks ...

Where is the "Main form" name stored in Delphi?

Which physical file stores the main form name for a Delphi application? e.g. MyApplication has a form MyForm which is set as the "Main form" via Project options. Where is the information "Main Form = MyForm" actually stored? In the Delphi IDE the application "Main form" is specified via the menu: Project | Options | Forms. The obvious...

How does WriteLn() really work?

Since the age of the dinosaurs, Turbo Pascal and nowadays Delphi have a Write() and WriteLn() procedure that quietly do some neat stuff. The number of parameters is variable; Each variable can be of all sorts of types; you can supply integers, doubles, strings, booleans, and mix them all up in any order; You can provide additional para...

Synchronization for multiple readers, single writer?

Another synchronization question...I hope you guys don't get annoyed ;) Assume the following scenario: one central data structure (very large, so I don't really want to make it immutable and copy it around whenever a change occurs. I even don't want to keep multiple copies in memory), multiple reader threads that access that data struct...

Qt for Delphi developers

Does someone know of a book or tutorial explaining Qt for Delphi / C++ Builder / VCL developers? What would be the best approach for a developer with that background to learn Qt? I'm particulary interested in how to accomplish things that I know how to do in Delphi with Qt. For example, what is the Qt equivalent to Delphi Frames? What...

editor component like RichEdit that supports embedding photos?

can anyone suggest an editor component like RichEdit that supports embedding photos in a delphi app? RichEdit doesn't seem to support this. am not considering embedding MS Word since not everyone would have that. than you for your help! ...

Problem with with Delphi 2009 and copying memory

I'm testing DelphiModbus library on Delphi 2009 and don't get quite the results I want. I think the problem lies with the following line on IdModbusClient.pas: Move(Buffer, ReceiveBuffer, iSize); It looks like ReceiveBuffer is set to some garbage. Buffer is defined as TIdBytes (from Indy components) ReceiveBuffer is defined as TComm...

"Left side cannot be assigned to" for record type properties in Delphi

Hi, I'm curious to know why Delphi treats record type properties as read only: TRec = record A : integer; B : string; end; TForm1 = class(TForm) private FRec : TRec; public procedure DoSomething(ARec: TRec); property Rec : TRec read FRec write FRec; end; If I try to assign a value to any of the member...

Increment hex string

Hi, I'm trying to increment an hex string like this: #$67#$1c#$87#$b1; #$67#$1c#$87#$b2; #$67#$1c#$87#$b3; Here's my procedure: var test : array [0..3] of char; intSequence : cardinal; Sequence := #$67#$1c#$87#$b1; procedure IncSequence; begin move(Sequence[1],intSequence,SizeOF(Sequence)); inc(intSequence); move(intSequence...

How do I bring my window to the front after a DDE event?

On a DDE event my program loads a file in and should pop to the foreground. I was using show; It only seems to be working like then when i have hidden the window. So i added bringtofront; Again this worked if it was hidden, closed, minimized or in the icon tray but not if it was open just under another window. I even tried some ...

Thread does not receive messages

There is a thread in my Delphi application that has a message-waiting loop. Every time it receives a message, it starts doing some work. Here is the execute procedure of that thread: procedure TMyThread.Execute; begin while GetMessage(Msg, 0, 0, 0) and not Terminated do begin {thread message} if Msg.hwnd = 0 then begin ...

Saving strings to disk under Delphi 2009

Hi. I have a structure like below that needs to be saved and loaded from disk. RSecStructure= packed record Name : string[255]; {NEED UNICODE SUPPORT HERE} ScreenName : string[255]; OrigFileName : string[255]; Prim : string[255]; ...