delphi-2009

is there a way in delphi 2009 to make form controls private?

is there a way in delphi 2009 to make form controls private? eg: if i add a label at design time, i'd like for it to impossible for code outside the form to access the label. (does delphi 2010 have this?) ...

Delphi Phrase Count / Keyword Density

Does anyone know how to or have some code on counting the number of unique phrases in a document? (Single word, two word phrases, three word phrases). Thanks Example of what I'm looking for: What I mean is I have a text document, and i need to see what the most popular word phrases are. Example text I took the car to the car wash....

How can I convert a WMF picture to GIF or PNG with Delphi?

Is there a way to convert a WMF picture to GIF or PNG with the Delphi 2009 (or newer) run time libraries? If not, which image conversion library would you recommend? ...

how can i make a TRibbonComboBox act like a TCombobox with Style of csDropDownList?

how can i make a TRibbonComboBox act like a TCombobox with Style of csDropDownList? we don't want the user to be able to edit the choices in the list. we need to use TRibbonComboBox because we want the current selection to be visible. Microsoft word shows a combobox where you can select an item but cannot edit the item itself. shou...

How Can I List a TDictionary in Alphabetical Order by Key in Delphi 2009?

How can I use a TEnumerator to go through my TDictionary in sorted order by key? I've got something like this: var Dic: TDictionary<string, string>; Enum: TPair<string, string>; begin Dic := TDictionary<string, string>.create; Dic.Add('Tired', 'I have been working on this too long'); Dic.Add('Early', 'It is too...

How to execute a program on PostBuild event in parallel?

I managed to set the compiler to execute another program when the project is built/ran with the following directive in project options: call program.exe param1 param2 The problem is that the compiler executes "program.exe" and waits for it to terminate and THEN the project executable is ran. What I ask: How to set the compiler to run...

Delphi 2009 MS Build headaches

does anyone know of any good description of delphi's build system? (i know it's using MS Build.) i'm using delphi 2009. i wanted to set up a variation of the Debug build configuration that (often) has different defines (d2009 seems to call them "preprocessor symbols"). the problem i'm having is that--even though i turned off "inherit...

How to resolve “Unit JclCompression was compiled with a different version of sevenzip.IOutArchive”?

Hello, There is already a similar question(link).The thing is I don't understand what unit I have to delete. I have installed the latest JCL library and added 'JclCompression' to the uses list in a unit and I get the error: "Unit JclCompression was compiled with a different version of sevenzip.IOutArchive". Please explain to me in a s...

How to include path in commandline?

CreateProcess() returns false when the commandline contains a path.I don't understand why. Here I simplified the operation: function ExecProcess(path:string):boolean; var StartupInfo:TstartupInfo; ProcInfo:TProcessInformation; begin FillChar( StartupInfo, SizeOf( TStartupInfo ), 0 ); StartupInfo.cb := SizeOf( TStartupInfo ); ...

How to get a float value the pointer points to?

Hello, In my app, i've created the TList type list where i store the pointers to 1 string and 2 float(real) values for every 3 items. aList.Add(@sName); //string aList.Add(@x1); //float aList.Add(@x2); //float Then, i want to get the values out from the list, but i could only do that for string sStr := string(lList.items[i]); But ...

How to create a console application that does not terminate?

Hello, In C++,a console application can have a message handler in its Winmain procedure.Like this: int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { HWND hwnd; MSG msg; #ifdef _DEBUG CreateConsole("Title"); #endif hwnd = CreateDialog(hInstance, MAKEINTRESOURCE(ID...

How to make this OO?

Hello, Sorry for the poor title,I'm new to OOP so I don't know what is the term for what I need to do. I have, say, 10 different Objects that inherit one Object.They have different amount and type of class members,but all of them have one property in common - Visible. type TSObject=class(TObject); protected Visible:boolean; en...

Does Delphi really handle dynamic classes better than static?

Hello, I was told more than once that Delphi handles dynamic classes better than static.Thereby using the following: type Tsomeclass=class(TObject) private procedure proc1; public someint:integer; procedure proc2; end; var someclass:TSomeclass; implementation ... initialization someclass:=TSomeclass.Create; finalizat...

Delphi - Memo Right Click Get Line Number

How do I get the line number of a memo when I right click on it? A ListBox has .ItemAtPos but I've not been able to find a similar function -Brad ...

Generic TypeIdenitifier convertion.How?

How do I convert the TypeIdenitifier to a class type? I need to use implicit convertion. type TMyChildArray<T>=class(TMyArray<T>) private FData:Array of T; procedure AddEnd(); end; TTypeIdenitifierParentClass=class(TAnotherParentClass) protected TestField:Cardinal; end; procedure TMyChildArray<T>.A...

How to show scrollbars in TScrollBox after it has been made visible again?

Hi, I've ran into one small problem. I am dynamically generating some controls and place them on a TScrollbox component. But I noticed that if the scrollbox is visible, user can clearly see each of the controls being created and placed. So it looks like lots of work is being done and it is slow. I hid the scrollbox and generated all th...

Delphi 2009 Actionmanager default Imagelist

I have just started a new project, and I am using the Delphi 2009 Actionmanager component for the first time. The Actionmanager has a list of standard actions, which gives me actions such as File open / save without any coding - great stuff. Is there a standard ImageList to go with this, with the correct images for the default ImageInde...

Did Delphi ever get a for each loop?

Hello, I've read that Delphi was supposed to get a for each loop in Delphi 9. Did this functionality ever make it into the language? My Delphi 2009 IDE doesn't seem to recognize the for each syntax. Here's my code: procedure ProcessDirectory(p_Directory, p_Output : string); var files : TStringList; filePath : string; begi...

Delphi - Clean TListBox Items

I want to clean a list box by checking it against two other list boxes. Listbox1 would have the big list of items Listbox2 would have words I want removed from listbox1 Listbox3 would have mandatory words that have to exist for it to remain in listbox1 Below is the code I've got so far for this, it's VERY slow with large lists. //...

The reasons to upgrade from Delphi 2009

I have made the question "community wiki" - it is subjective. I have upgraded to Delphi 2009 because of unicode support. I have found the anonymous methods a very interesting and useful language feature, I can't say the same about generics. The generics seemed important for me before the upgrade to Delphi 2009, but I have never used the...