delphi

Does Delphi's static keyword have any point in native-only code?

My understanding is that the static keyword was introduced for compatibility with .NET (along with strict) class TExample class procedure First; class procedure Second; static; The differences between procedures First and Second are :- First can be overridden in a descendant class First passes an implicit self parameter referenc...

What datatype/structure to store file list info?

I have an application that searches files on the computer (configurable path, type etc). Currently it adds information to a database as soon as a matching file is found. Rather than that I want to hold the information in memory for further manipulation before inserting to database. The list may contain a lot of items. I consider performa...

Getting local IP address in Delphi

Possible Duplicate: Delphi, How to get all local IPs? What's the easiest & quickest method for obtaining a local IP address of the machine in Delphi 2009 without using 3rd-party components? Thanks. ...

How to get the first element in a string?

Hello, I'm trying to figure out a way to check a string's first element if it's either a number or not. if not(myString[0] in [0..9]) then //Do something The problem is that I get an error "Element 0 inaccessible - use 'Length' or 'SetLength" Another way came to my head from my C-like exprieince - convert the first element of the st...

Debug Breakpoint doesn´t work only in DataModule unit - Delphi

Hello folks, Debug breakpoint's works fine in all other 38 units of my system. But, in my DataModule, that have +- 10.000 lines, delphi disables then after I launch by F9/F8/F7. In any part of source that unit, even on obrigatory steps like OnCreate, SQLConnection.Active:=true, etc. Detail: works fine until +- 20 days ago. I'm using D7 a...

Description of datamodule in dll?

I created a costumer's database program. I have a problem in which I create a data module in a DLL and I compile it but then get some error below. My concept is The data module created in DLL and I insert ADO components in the data module. This data module is used in another form. I created a db grid in the form but it doesn't ...

Delphi 6 with ADO + Oracle returns NUMBER with different precision, generating BCD overflow

Hello, I'm having a problem with Delphi 6 + Oracle 10gR2 + ADO + ClientDataSet. Whenever I run a aggregate function on a field NUMBER(19,9), the resulting column returns a NUMBER datatype to Delphi, and on some machines it loads as a TBCDField with a precision of 38, and everything goes well, but on some machines it loads as a TBCDField...

Sort DBGrid by clicking column's title

Well, this seems a little tricky (if not imposible). I'm tryin to make my DBGrid sort its data by clicking on column's title. The thing is that I'm (sadly) working with Delphi3, I'm not using ADO DataSets and the query gets a lot of rows, thus I can't reopen my TQuery changing the "order by" clause on clicks. Someone has implemented so...

How can I encode a stream so that it can be stored in an xml file?

I am working with QuantumGrid 6 from Devexpress. I need to store the grids settings in an xml configuration file. Unfortunately, the grid does not allow XML as a storage option. I can however export the settings to a stream. I'm thinking to export to a stream then convert the stream to text and store it as an xml value. I guess the text...

Allocating memory for dynamic array - The block header has been corrupted (FastMM4)

Hi. I had a topic 1-2 weeks ago about a "The block header has been corrupted" and "Block has been modified after being freed" error. Somebody gave me a good tip (thanks Alexander) about setting FullDebugModeScanMemoryPoolBeforeEveryOperation to true and finally I have some indications about where is the TRUE location of the error. The ...

How to create a form in a dll and have it show up in the taskbar?

Hello All Friends.. I create a dll and insert in form i compile it successfully. I Need Help? The Form caption does not show in windows task bar. ...

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

Why is DebugHook not set to 1 in my Delphi add-in DLL?

When I'm running my COM Office add-in from within the Delphi 5 IDE (using any of the office applications as the host), breakpoints work fine (when using remote debugging symbols and a properly set output folder), but none of the non-delphi exceptions (like access violations) in my code triggers the IDE to break at that point. In stead, t...

How to use TDictionary?

Hello, By using Google I have found some nice snippets of example code for using TDictionary in Delphi, but have not been able to compile any of them. I use Delphi 2009 Update 1,2,3,4. When I write this: var Dic: TDictionary<Integer,string>; I get "Unknown idenitifier TDictionary<,>" How to use them? ...

Delphi = Pascal? Resources for Learning?

Well, I am new to Delphi and really offline programming in general (other than the standard C++) and recently acquired a copy of Delphi and was kind of interested in starting with it. I read somewhere that it uses Pascal but I was confused on if it used Pascal, as in it was programmed with it, or if it used Pascal as in the language you ...

Freeware pivot table component for Delphi?

Is there a pivot table component for Delphi that is opensource or freeware? ...

How does one change the text on the clipboard without altering the format information?

Another clipboard question: When text is put onto the clipboard, it frequently goes in multiple ways, usually with and without formatting information. What I want to know is this -- how do you change the text on the clipboard without altering the formatting. In other words, I want to change the text side of things, but keep the forma...

How can I do an image tile in an MDI application?

I have tried a lot of code over the year but nothing work 100% I just need to be able to put an image as the background of my main form, and be able to tile it. I am using DELPHI 2007. ...

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

How do I make a PNG resource?

I've got a form with a large TImage on it as a background. Problem is, this is stored directly in the DFM as a bitmap, which takes up about 3 MB. The original PNG file is ~250K. I'd like to try to reduce bloat by embedding the PNG in a resource, and then having the form load it during OnCreate. I can do that now that Delphi 2009 incl...