delphi

TDBGrid onSelect

Hi,I would like to customize TDBGrid: 1) add onSelect/onUnselect events - e.g. good for show count of selected items. 2) remove select item on left mouse click. I have inherited TDBGrid and rewritten MouseDown, but then it is not possible to move or resize columns :( So, how to do it? D2009 ...

How does acrobat encode annotations added as sticky notes to pdfs?

We have been reading and writing Sticky Notes/Annotations/Comments to pdfs via an activex control in our application for a number of years. We have recently upgraded to Delphi2009 with Unicode Support. The following is causing problems. When we call CAcroPDAnnot.GetContents The results seem to be rather strange and we lose our Uni...

Is it possible to turn off Unicode support in RAD Studio 2009?

Hi guys, I have a little trouble with RAD Studio 2009. As you know, it is possible to switch Unicode support off in MSVS (right click on solution->properties->character set=not set). I need to find this feature in RAD Studio, I know it exists but do not know where exactly. It`s the only thing that stops my work on a Socket Chat universit...

Find the Minimum Positive Value

What's the best algorithm to find the smallest non zero positive value from a fixed number (in this case 3) of values or return 0 if there are no positive questions? My naive approach is below (in Delphi, but feel free to use whatever you like), but I think there's a more elegant way. value1Temp := MaxInt; value2Temp := MaxInt; value3T...

Identifiers for Delphi's $WARN compiler directive

Delphi has a $WARN compiler directive that allows one to selectively enable or disable specific warnings. The Delphi 2009 help file describes the syntax: {$WARN identifier ON|OFF} But it only lists the identifiers for 6 warnings. I'd like to have a complete list of all the warning identifiers. In particular, I want to know the iden...

Delphi issue with sharing Image Lists across forms

I've been sharing image lists across multiple forms in Delphi for years now. I have a TImageList on the main form of my app and then I have other forms that have components where I set the Images property to the image list from the main form (e.g. MyMainForm.MyImageList) at design time. The problem I'm having is that randomly the Images...

How do I change the mouse cursor when the left mouse button is down?

In Delphi 2007, in a mouse move event, I try to change the mouse cursor with: procedure TFr_Board_Display.PaintBox_Proxy_BoardMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin if left_mouse_button_down then begin if some_condition then begin Cursor := crDrag; end else begin Cursor := crN...

WebKit support for Delphi

Is there a way to embed the WebKit engine into a Delphi application? ...

How can I display Crystal XI reports inside a Delphi 2007 application?

The most recent Crystal XI component for Delphi was released for Delphi 7. That VCL component compiles in D2007, but gives me errors at runtime. What is the best way to display a database-connected Crystal Report in a Delphi 2007 application? ...

Dictionary (from Python) component for Delphi?

Is there similar component for Delphi like dictionary of Python? I'm now using TStringList to map string/object pairs, but I'd like more general approach and maybe more powerful (TStringList has binary search when it is sorted). Solutions for pre-D2009 are also welcome. ...

Is there some better way to copy all DataSet Fields and their properties to another DataSet?

I'm cloning a TClientDataSet and I want to copy all the fields to the clone (which is a new DataSet), I know I can loop through the Fields and copy the info, or make 2 instances of my class and just clone the cursor, but is there some better way? Something like create a new DataSet and assign the fields info? EDIT: The following class ...

DELPHI IDE - Stopping F12 from bring up the ‘CPU’ Window

I am busy developing a Delphi App that uses F12 When I am running the software under the Delphi IDE and press F12 the program stops and the ‘CPU’ window opens up What can I do to stop the Delphi IDE from doing this when F12 is pressed ? ...

Delphi date comparison

What is the difference between the two functions "IsSameDay" and "SameDate" in the Delphi DateUtils library? ...

Correct way to maximize form in delphi (without caption)

I have a form without caption, using on double click to maximize : Code looks like this: procedure xxxxxx; begin if Form1.WindowState=wsNormal then begin Form1.WindowState:=wsMaximized; Form1.SetBounds(0,0,screen.Width,screen.Height-getHeightOfTaskBar); end else begin Form1.Windo...

Free IDE for Delphi Prism

Hi, I've the Delphi Prism command line compiler... is there a free IDE that I can use? Must have intellisense etc just a plain editor no drag-drop required. ...

Controlling where (x,y) of a newly opened window in Delphi 2006

I'm trying to control the coordinates of where my program opens a new window because currently they're opening ontop of each other. Does anyone have a working example of how to do this? ...

Enums vs Const vs Class Const in Delphi programming

I have an integer field in a ClientDataSet and I need to compare to some values, something like this: I can use const const mvValue1 = 1; mvValue2 = 2; if ClientDataSet_Field.AsInteger = mvValue1 then or enums TMyValues = (mvValue1 = 1, mvValue2 = 2); if ClientDataSet_Field.AsInteger = Integer(mvValue1) then or class const ...

Delphi: App initialization - best practices / approach

I run into this regularly, and am just looking for best practice/approach. I have a database / datamodule-containing app, and want to fire up the database/datasets on startup w/o having "active at runtime" set to true at design time (database location varies). Also run a web "check for updates" routine when the app starts up. Given ...

Delphi visual component - moving away from TFrame base?

I have a visual component that I built from a TFrame (but then registered to the palette, etc); it works great and I loved being able to build it VISUALLY using the IDE. I would now like to create a "family" of related components, and to do so, would like to create a superclass of this component, and then inherit this component and othe...

Why is my cloned dataset blank?

I'm using TClientDataset.CloneCursor to implement different views of the same data. I have a master dataset, and several clones, each of which contains a different subset of the master dataset's fields. But when I try to display data from the clones, they come up empty. The master dataset is populated with data correctly, and the clon...