delphi-2009

Why is GenTLB renaming symbols (appending '_')

牧云@^-^@ 提交于 2019-12-24 18:12:43
问题 I am using GenTLB.exe to compile a ridl file to .tlb and _TLB.pas files. In the resulting _TLB.pas file, there are hints that it has renamed a number of symbols by appending an underscore to the end of the name. A sample of the hints is: // Errors: // Hint: Symbol 'Assign' renamed to 'Assign_' // Hint: Enum Member '_amStretch' of 'EnumVRSAppliedMaterial' changed to '_amStretch_' // Hint: Enum Member '_amTile' of 'EnumVRSAppliedMaterial' changed to '_amTile_' The command line I use with GenTLB

TImageList - True color + alpha channel vs. 8-bit (256 colors)

空扰寡人 提交于 2019-12-24 14:54:11
问题 I use c++ Builder 2009 but I tagged this for Delphi as well since I expect the exact same issue to exist there as well. I use TImageList (16x16) and associate it to TListView (SmallImages) and TTreeView . I was adding new icons via the IDE (design time) and imported some 16x16 True color + alpha channel icons. In the IDE they looked fine: During run time, they do not look fine at all: Notice the edges especially. The top icon is icon 5 and the bottom icon is icon 7. See how they are supposed

how to convert byte array to its hex representation in Delphi

天涯浪子 提交于 2019-12-24 06:06:45
问题 I have TBytes variable with a value [0,0,15,15]. How can I convert it to "00FF" ? I dont want to use loops, bcoz this logic to be used in time intensive function. (I tried using BinToHex, but I could not get it working with string variable.) Thanks & Regards, Pavan. 回答1: // Swapping is necessary because x86 is little-endian. function Swap32(value: Integer): Integer; asm bswap eax end; function FourBytesToHex(const bytes: TBytes): string; var IntBytes: PInteger; FullResult: string; begin

Universal MP3 and WMA tag reader for Delphi

瘦欲@ 提交于 2019-12-24 03:43:51
问题 I know similar subjects have appeared in SO, but there wasn’t answer I am looking for. I need a Delphi library for reading tag information from music files. Currently I am using TJvID3v1 from JEDI library, but as far as I see, JEDI does not work with WMA files. I have found some manuals on how to implement such tag reading, but most of them go quite low level (reading file byte-by-byte and analyzing). So, do you know of any Delphi library capable of reading that information? Support of OGG

Universal MP3 and WMA tag reader for Delphi

浪尽此生 提交于 2019-12-24 03:43:11
问题 I know similar subjects have appeared in SO, but there wasn’t answer I am looking for. I need a Delphi library for reading tag information from music files. Currently I am using TJvID3v1 from JEDI library, but as far as I see, JEDI does not work with WMA files. I have found some manuals on how to implement such tag reading, but most of them go quite low level (reading file byte-by-byte and analyzing). So, do you know of any Delphi library capable of reading that information? Support of OGG

Error when using strings in TOmniValue array in a BackgroundWorker

我只是一个虾纸丫 提交于 2019-12-24 03:07:44
问题 When I have a string in a TOmniValue array, then accessing the value by name or by explicit index raises an access violation. See the following code for an example. Am I doing something wrong, or is there an error in Delphi or TOmniValue? I found a workaround for accessing by index, but what about by name? UPDATE: I've moved Test into a console app for easier reproduction, but now the error only occurs in every second run or so instead of every interation. Or maybe it is not even the same

Is there a way to know if TAdoQuery in Edit state was changed?

瘦欲@ 提交于 2019-12-23 23:22:49
问题 Is there a way to know if TAdoQuery in Edit state was changed? Assuming we forced it into edit state, and we want to ask the user if he wants to keep the changes. 回答1: You have the TADOQuery.Modified property e.g: if ADOQuery1.State in [dsEdit, dsInsert] and (ADOQuery1.Modified) then if KeepChanges then ADOQuery1.Post else ADOQuery1.Cancel; 来源: https://stackoverflow.com/questions/7792193/is-there-a-way-to-know-if-tadoquery-in-edit-state-was-changed

Error message “Incorrect values within SQLDA structure” with Firebird and Delphi 2009

梦想与她 提交于 2019-12-23 21:25:47
问题 I'm strugling with error message "Incorrect values within SQLDA structure" when I'm trying to update blob field within Firebird 2.1 database from Delphi 2009 DBX application. However I get the error message when I'm trying to execute TSQLQuery with following SQL: "update MYTABLE set FIELD1= :data where id = :id" The relevant delphi code is: MyQuery.ParamByName('id').AsInteger := id; MyQuery.ParamByName('data').LoadFromFile(filename, ftBlob); MyQuery.ExecSQL(); Where should I be looking? This

How to rebuild a TListView but keep the scroll information?

余生长醉 提交于 2019-12-23 21:12:52
问题 In TListView there is a bug: when you are in vsReport mode with GroupView set and try to insert a item, it is displayed last in the group not where you inserted. The problem is debated here. There are a few answers but none of them work. So, I think the only solution is to rebuild the entire list every time you insert a item. It's not simple but I think I can do it. But there is a big problem. If the scroll window is in the middle of the list and I rebuild the list, it send me back to the

Delphi 2009 Ribbon Controls - Glass Frame

你。 提交于 2019-12-23 15:05:06
问题 I've been starting to use the new inbuilt Ribbon controls in Delphi 2009 and use the custom frame so the Application button and Mini-toolbar slide up onto the Window Frame, but I'm wondering if on Vista it should use the glass effect like Office 2007 does, and if so how I would enable this setting. Thanks for any help. 回答1: Unfortunately it doesn't appear that that CodeGear implementation of the Ribbon control is compatible with the glass frame. Something about the way it draws disables it.