delphi

Delphi: memoryleak in IdStack, but who uses IdStack?

FAstMM reports a memoryleak from a TIdCriticalSection in IdStack.pas. I understand this is a intentional leak, that is documented in the code. What I do not understand, is why IdStack is included in my project. How can I find out what unit pulls it in? Is there a way of excluding this leak from the report, using the version of fastmm t...

Delphi and i18n

Does Delphi support internationalization in any way? I've seen that I can add different languages for a project, but that seems to create multiple instances of the dfm files. Am I right that the language therefore cannot be changed at runtime? How do you handle internationalization (if you do)? Are there any best-practices? ...

create a plugin in Delphi Prism using Hydra (Remobjects)

Hi, I have to create a plugin in Delphi Prism for Application that is already in Delphi. I have read all about Hydra 3.0 in www.remobjects.com and have some queries. Can you please give me an example how to create custom Interfaces for communication between Delphi Host and .Net Plugin.(either in C# or Delphi Prism) what is the role ...

Peter Below's Threaded Splash Screen and Modal Dialogs

I'm using Peter Below's PBThreadedSplashForm to display during application startup. It gets updated as various databases are opened during the creation of the data module (just before the main form is created). The problem is that we have a check for the existence of certain things that is done during the creation of the data module. If...

Draggable components?

Hello, I have two forms(one main form,and one submain form).I'd like to do something like CodeGear's IDE panels on drag-and-drop.Meaning I could move them and they merge with other components. However,I'm asking for something different: I'd like to drag the submain form into the main form and to turn it into a something like TFrame or...

Delphi 4 error:- Incompatible Types : “TBitmap” and “TObject”

Hello! Getting this error while I am trying to run /compile/build a Proiject Incompatible Types : “TBitmap” and “TObject” The cursor is pointing to Bitmap := FSectionList.BackgroundBitmap Kindly help me figure it out. Struck here like a ambulance in heavy traffic Here is the part of the code:- procedure ThtmlViewer.DoBackgro...

make a Delphi TPanel caption wrap

Is there a way to wrap the text in a TPanel.Caption in Delphi (in my case Delphi 6)? thanks! ...

How to make dockable forms like in IDE?

I googled for dockable forms in delphi and found this: That's not so difficult. First off: The windows in the Delphi IDE aren't MDI forms, by SDI forms. Now to create a dockable window. Form2 will be dockable and Form1 will be the place to dock it to. Place a control (such as a TPanel) on Form1 to serve a DockSite. Make sur...

Delphi warnings are bugging me

In one of my component sets, I am getting a number of warnings at compile time: "Method Create (Clear, DrawTab) hides virtual method of base type ControlX". My problem is that I don't know enough about virtual methods and Delphi to know how to fix this properly (we have the source code). Does anyone know how to fix this type of error i...

How to send WM_ENTERSIZEMOVE?

Hello, I have the following code called on WM_MOVE procedure TForm15.WMMove(var Message: TMessage); begin if( (((TWMMove(Message).XPos + Self.Width >= Form14.Left) and (TWMMove(Message).XPos <= Form14.Left)) or ((TWMMove(Message).XPos <= Form14.Left + Form14.Width) and (TWMMove(Message).XPos >= Form14.Left))) and (((TWMMove(Message)....

Check if Mouse LButton is down?

Hi, How do I check if the Left button of my mouse is currently pressed down/dragging something(I preffer the first possibility). I tried Mouse.IsDraging,but no result. NOTE: I handle mouse messages in my application so its no problem if its a WM,just share a way to accomplish my task. ...

How to get the weight for a stored image in Delphi 2009?

I have images stored in my database, when fetching these images I wish to know what the weight (20KB,90KB,etc.) per image is. How do I get this info? Thanks in advance. ...

How to implement multiple inheritance in delphi ?

I'm currently doing a full rewrite of an old library, and I'm not sure how to handle this situation (for the sake of being understood, all hail the bike analogy): I have the following classes: TBike - the bike itself TBikeWheel - one of the bike's wheel TBikeWheelFront and TBikeWheelBack, both inherits from TBikeWheel and then implemen...

Delphi: Clientdataset: EDatabaseError: Missing Data-Package using Synapse

Hi! From the client I am sending a string to the server what he should send me back. This time its a stream created by a ClientDataSet. Unfortunately receiving (or sending??) does not work at the moment. Note: I am using Synapse with blocking sockets. The server is multithreaded. The Server: procedure TTCPSocketThrd.Execute; ...

is WSAASyncSelect good enough? Could you suggest an alternative? Is Indy better?

Hello, I never liked components for winsock programming,I loved it in its natural way,but today my collegue told me to use Indy for my project.Could you tell me if Indy better alternative for my project? -2 TCP servers,2 TCP clients.4 sockets total -The project is a proxy. And now the second question,I read daily that WSAASyncSelect i...

How can different instances of the same form class use different window class styles?

Hi, I try to use the following technique in order to enable/disable the shadow effect for a window: (The CreateParams is of course overriden. The TToolWindow descends from TForm). procedure TToolWindow.CreateParams(var Params: TCreateParams); var LShadow: boolean; begin inherited; if (Win32Platform = VER_PLATFORM_WIN32_NT) ...

How to make a form docked when the project is ran?

Hello, I'd like to make my form docked where it usually is when my application is executed. I see only one way of doing that: -Call OnDockDrop in the container where I usually drop it But how to setup OnDockDrop's parameters? ...

Delphi 2007 and {$IFDEF...} directive, fails to see our conditional

We have the following in our codebase, in a component file: {$IFDEF ADO} FDatabase : TADODatabase; {$ELSE} FDatabase : TODBCDatabase; {$ENDIF} The reason is that for various legacy applications, one or the other type of database connection and set of classes is to be used. However, while configuring a new machine, it seems that our c...

Delphi certifications

Long time ago, there was a possibility to pass a Delphi exam and gain some Delphi certification (like MCP). Is there any chance to pass such an exam now? Is some certification authority issuing such certifications? While being MCP and MCSD it would be nice to have a proof of my knowledge in Delphi world… ...

Showing cell content on hint in DevExpress grid

I am using TcxGridDBTableView from DevExpress. Some of the cells contain really long strings, so I want to be able to show them to users using Hints. I want also to be able to do have line brakes in hint in places of semicolon in my text. Do you know how to simply achieve this? ...