vcl

ListBox long items hints

There's a ListBox with some long items. These long items are getting beyond the right edge of the ListBox and here comes an idea to show hints for such items when the mouse is over them. I've found an example: procedure TForm1.ListBox1MouseMove (Sender: TObject; Shift: TShiftState; X, Y: Integer) ; var lstIndex : Integer ; begin with...

How to get the items and subitems in a listview?

Hello, I want to get all items and subitems in my listview,but all I get is "TlistItem" Here's my code: procedure TFrameAnalyzer.AddEntry(opcode:word;data:Array of byte;direction:byte); begin MessageBox(0,PChar(sListView1.Items.Item[4].ToString),'',0); end; How do I get the name of the item as string and the name of it's 2 subitem...

Bring form on top of others when clicked on taskbar button in Delphi.

Base question: http://stackoverflow.com/questions/1141544/tstatusbar-flickers-when-calling-update-procedure-ways-to-painlessly-fix-this The executed code is in the questions first posts first part ( you can see light grey separating line ) ... But - problem is that while this code is executed, form does not automatically activate and ...

Use of Frames in Delphi for GUI information hiding

Hi, I have been learning Delphi for the last 3 years, on a hobby/occupational level. I am happy to say that I have now progressed to the point that I can look back on my early code with horror and embarrassment. So I am now going through some of my early apps and rewriting/ refactoring them. One of the bad habits I am trying to get away...

Component disabling and enabling at runtime in Delphi 2K9. Weird problem...

Here is code: procedure DisableContrlOL(const cArray : array of string; ReEnable : boolean = False); // can be called from VKP / RAW / Generation clicks var AComponent: TComponent; CompListDis, CompListEna : TStringList; begin CompListDis := TStringList.Create; CompListEna := TStringList.Create; for i := Low(cArray) to High(cA...

How to set two radiobuttons in one group and two in another group?

Hello, I have total 4 radiobuttons on my form,I want to set the first two buttons in one group and the second two in another group so that I can check one from the first group and one from the second group. Right now,if I check one from the first group,the one from the second group becomes unchecked. I've always wondered how to do thi...

Converting C++ Builder code to C# .NET (TComponent, TOjbect, TList, etc.)

Where can I find API documentation for TComponent, TObject, TList, etc.? I am converting some C++ code that was written using C++ builder into C#. I'm having trouble finding related documentation for these classes in order to find a C# equivalent. ...

What is a "customizable VCL designer guideline" in Delphi?

The web page http://www.codegear.com/en/products/bds2006 starts with a list which includes this line: Ensure visual consistency with customizable VCL designer guidelines. Is this related to the 'laser-line' guidelines? How can these guidelines be 'customized'? Edit: This page gives additional information about this feature....

Problem with IDropTarget when using with a VCL Form

I have a VCL gui developed in Codegear. I have created a DropTarget for the mainform and the DropTarget object implements the IDropTarget interface which allows me to drag and drop files from explorer. Now because I only want some of the child components to be drop targets (not the whole form), I only have the DragEnter method return S_O...

Will a Delphi form always fire OnResize when it's shown?

If I create a new Delphi form, hook its OnResize event, and run the app, OnResize is fired before the window is shown. What I don't know is whether this will always happen, for any window. (For anyone familiar with the Windows API, I've traced it to the ShowWindow call in TCustomForm.ShowingChanged (Forms.pas line 5503 in Delphi 2007), ...

Under what conditions will a TForm fire OnResize on show?

As an extension of this question: TForm.OnResize is sometimes fired before a form is first shown, but not always. For example, if BorderStyle is either bsDialog or bsNone, then OnResize will not fire. For all other BorderStyle values (and with all other properties at their defaults), OnResize does fire. Are there other things that affe...

Creating a custom form designer

I'd like to create a custom "datamodule" in Delphi, a TDataModule like (maybe inherited) class which would have a custom grid based design interface (one component per line, some properties as columns). Is this possible? Where should I start? I'm currently using Delphi 2007. ...

What's the difference between Refresh,Update,Repaint?

Hello, I don't know ,which of those three suits me most,they all work for me.Does anyone know the difference between Refresh,Update and Repaint? ...

DBGrid scroll page instead of row

Well I have an issue with DBGrid vertical scrolling. When I scroll it vertically with mousewheel or vertical scrollbar it moves selected row up and down. I want to make it scroll not selected row but entire grid. Just like it works in Microsoft Excel for example (just to let you know what I mean). Any suggestions? ...

How to disable/hide icon from a form?

How do I create a second form with a close button,but without an icon. ...

Does the Illinois Mega Million lottey ticket have the number encoded on its barcode

I am writing a delphi program that scans an Illinois lottery ticket and puts the numbers in a database to keep track of winning tickets. The barcode for the tickets does not seem to be readable; is there anywhere I can get a driver or component (preferably VCL) that can help me in this matter? ...

How to tile a Image in TImage?

Hello, How do I tile a image in a Timage in Delphi? Why I need it: Instead of creating more TImages at runtime,I could create one and store my image there knowing that it will be 'fit' until it reaches TImage's height and width. Please suggest any ideas to do this. Thank you! EDIT: Please note,I'm not asking for streching the image,...

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) ...

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? ...

[Delphi] How can parent form tell if a non-modal form is still open?

If a Modal form creates a form and does .Show, how can the parent later determine if the non-modal form is still open or if the user closed it? ...