delphi

Is there a way (without coding explicitly) to display a number using the metric prefixes?

This question is relaetd to This question, on using some of the windows explorer features automatically inside a Delphi application. Is there a way to format an integer using the metrix prefixes automatically in Delphi? Somehow to automatically obtain a result like windows explorer gives? I mean converting 1024 to 1.0 K automatically. ...

Delphi: how to lock dfm-s to not change...?

Hi! We used Delphi 6 long times ago. Our problem, that Delphi have two problems with DFMs: 1.) When some linked resource (like DataSet) will removed, Delphi many times forget to ask you that "some of the resources are linked, you need to redirect...". This happens, when the actual form is not added to the project, or it is not opened. ...

Fastmm4 and leaking handles...

Hi to all, I have just used FastMM4 to detect leaks. I did not realise our application was using a DLL which was leaking event handles and so I fixed any leaks reported by FastMM4 but not the handles as it was not reported. My questions are, would have FastMM4 have reported the leaking event handles? Would this require me to rebuild th...

Multiple Search Results Tabs From Mulltiple "Find In Files" Actions

Hi, In Delphi 7 when i ran multiple Find In Files searches each search result would generate a separate tab. We've since upgraded to Delphi 2010 and now when i run multiple Find In Files searches each time one is fired off it replaces the tab instead of creating a new one with the results of the successive search. Is there a way to get ...

Why does the CPU window always appear when trying to debug my project after a rebuild in Delphi 2010?

Hi, Whenever I rebuild my application and try to step into a break-point the CPU window always appears. From what I understand the CPU window appears when DCU does not match up with the source file, however, in my case the DCU's are defintely being re-compiled and there are no old ones lying around or anything like that. The strange th...

Delphi OLE - How to avoid errors like "The requested member of the collection does not exist"?

Hi, I'm automating Word with Delphi, but some times I got an error message: The requested member of the collection does not exist It seems that the Item member of the Styles collection class does not always exist and some times causes the above mentioned error. My workaround is to catch the exception and skip it, but is there an...

run a program under a limited user account

hi all, i want to develop a program that will process images and show all esxisting images with details like "picasa photo viewer",also i have a windows service that gathering new images,it will run under "Local System Account",but in limited user account my program don't work,how i can run my program from limited user account ? thx for ...

Can I get a PTypeInfo from a string?

This is probably going to be a "no", but is there any way I can use Delphi's RTTI, either old-school or the 2010 extended RTTI, to pass in a string containing the name of a type, specifically the name of an enumerated type, and have it give me the PTypeInfo for that type? I've looked through RTTI.pas and TypInfo.pas and I don't see any ...

Convert DeDe constant to valid declaration or other interface extraction tool?

I am using DeDe to create an API (Interface) I can compile to. (Strictly legit: while we wait for the vendor to deliver a D2010 version in two months, we can at least get our app compiling...) We'll stub out all methods. Dede emits constant declarations like these: LTIMGLISTCLASS = 00: ÿÿÿÿ....LEADIMGL|FF FF FF FF 0D 00 00 00 ...

insert number of days of year, months, days of month

How can I insert in a database the number of days of the year and at the same time insert in the same record the month, day of the month, and the day of the week? This is my table: tabela/coluna.Dias_ano(registo 1...365) Year:=StrToInt(ano.Text); diasano.Text:= IntToStr( DaysInAYear(Year) ); diasAno| Mes |diames |dia semana | 1 | ja...

What does Indy's HandleRedirect do?

I'm having some trouble reading files with Indy from a site that has WordPress installed. It appears that the site is configured to redirect all hits to sitename/com/wordpress. Can I use HandleRedirect to turn that off so I can read files from the root folder? What is the normal setting for this property? Any downsides to using it fo...

How to expose a Delphi set type via Soap

I'm currently creating soap wrappers for some Delphi functions so that we can easily use them from PHP, C# and Delphi. I wonder what's the best way to expose sets. type TCountry = (countryUnknown,countryNL,countryD,countryB,countryS,countryFIN,countryF,countryE,countryP,countryPl,countryL); TCountrySet = set of TCountry; func...

Upgrade from Delphi 2007 to Delphi 2010?

What should I worry about if I move to Delphi 2007 to 2010? I've checked this article and there was a lot of interesting stuff but not precisely for this jump that I need. To clarify my question and situation: I have all 3td party components' code. I will need the unicode, but not this year. I need win 7 support - themes, form resiz...

Delphi 7: ADO, need basic coding example

I am a complete n00b here. Can someone please post some Delphi code to create a database add a simple table close the database then, later open a database read each table read each field of a given table perform a simple search Sorry to be so clueless. I did google, but didn't find a useful tutorial ... Btw, it would be usef...

Delphi: Application error logging in the field

Using Delphi 7, I wonder if there is a free component which will collect diagnostic information as my application runs at a remote site and will help me to debug error reports. Maybe it records each menu item selected, control clicked, text input, etc? Maybe it just dumps the stack on a crash. Maybe it does something else ... I don't m...

how make function like IsWordPronounceable(SomeWord:String): boolean;

I would like to make a function IsWordPronounceable(SomeWord:String): boolean; "english language" i am working with SAPI Speech Recognition and i need this function. I use delphi compiler, C/C#/C++ or any language is ok.. please help. i dont know how to start... from the start, i thought adding grammar rule could solve the problem. the ...

How expose the properties of an component created in an activex form

You can publish the properties of an control that is inside a activex form? example I have a form with an TAdoconnection component, I wish the properties of this component can be modified by the user when he loads my activex control. UPDATE @TOndrej gives me a very nice sample, but this sample only works for components derived from ...

TBaseSocket.WaitForData required for SendBuf

That's odd, TBaseSocket's WaitForData documentation specifies that you should call it before SendBuf and Sendln calls. I had a quick try and (perhaps because I trying to write first) this WaitForData call returns false. (after timing out the specified timeout) So is this incorrect? Or incomplete? Or only valid in a number of circumstanc...

How to display a thumb image or first frame from a MP4 file using Delphi 7

Hi, I need to display a thumbnail preview of a folder full of MP4 files. So, is there a Delphi 7 component which extract a thumbnail image from MP4 files (if MP4 does contain a thumbnail image), or is there a Delphi 7 component which can extract the 1st frame from a MP4 file ? I need to extract it so I can save it to a .jpg or .png f...

PasteSpecial using Ole,PowerPoint,Delphi

How do you use PasteSpecial in Delphi to paste into an Ole PowerPoint. I have rtf data i want to paste into powerpoint and I need to use PasteSpecial. However I cannot find documentation on how to fill out the parameters it needs. ...