delphi

How can I implement a thread-safe list wrapper in Delphi?

I have a list wrapper that maintains two Tstringlists and a TClassList I need this to be thread safe, such that: Concurrent writes are not allowed (wait state of some sort should be entered) Reading while writing (or vice versa) is not allowed (wait state of some sort should be entered) Concurrent reads are allowed Any ideas on how ...

Should GExperts Functionality be Incorporated into Delphi?

I recently upgraded to Delphi 2009 and was disappointed to find out that I couldn't easily replace one VCL component with another. The best answer back was that GExperts could be used to do this. Is it worthwhile to petition Embarcadero to incorporate some or all of the capabilities of GExperts right into Delphi? Which of their "Expert...

Custom component redraw issue with Delphi

I have written a new custom component derived from TLabel. The component adds some custom drawing to component, but nothing else. When component is painted, everything works fine. But when the redraw is needed (like dragging another window over the component), "label part" works fine but my custom drawing is not properly updated. I'm bas...

Activate a File Virus Scan from within Delphi app

We have an app that monitors a folder for file drop and need to initiate a virus scan before using any incoming files. This needs to be a part of the Delphi app and the file must pass the Virus Scan otherwise we delete the file. I know that there are command shell options available, however this must be a direct API call to a registere...

Spin Control in Delphi

I want to use a "spin button control" (also known as an up-down control) in my Delphi Win 32 application (I'm using Delphi 2007). The aim is to have a control that looks like in Microsoft Office: I found this on the Microsoft website: CSpinButtonCtrl Class But I haven't so far found a control that uses this class - here's where I'v...

Detect citrix "application mode"?

Forgive me for probably using the wrong term for this "application mode". Our application has a problem during start in that it doesn't show a task bar icon until the main window is up, even though there are loading progress windows, logon-windows, etc. on screen before that. We change the code to fix this, but unfortunately this fix, ...

Getting started with SOAP for Delphi in Win32

I have a server process built in Delphi/C++Builder with RemObjects SDK which claims to support SOAP requests. What's the quickest and easiest way of testing out the SOAP support? I'd prefer not to have to learn a new language/install a new IDE/spend more than a day... To clarify this, I'm already connecting to the server happily using ...

What are major incentives to upgrade to D2009 (Unicode excluded)?

I'm a hesitant upgrader when it comes to development tools. For roughly half of my product I still use D7, and for others D2006. The truth is, although Unicode support is more than welcomed and very useful, it could cause me more troubles than gains with my current projects (they are more-or-less Unicode ready already). It's especially ...

FreeMM vs ShareMem

Hi, We have a lot of dll-libraries written in both delphi and c++ builder, and use sharemem and borlndmm.dll. An aligment-issue in a 3thparty library forces us over to the new memorymanager in delphi 2007. Can someone please explain 'shared memory manager' for me? Is SimpleShareMem a dropin replacement for ShareMem ? Can we then stop ...

How can I convert unicode characters to ascii codes in delphi 7?

Title says it all. Edit: Yes we're talking about asci codes. My appologies I'm not the delphi dev here. ...

How to do HTTP POST in Utf-8 -> php script -> mysql

I am using Delphi 7 and ICS components to communicate with php script and insert some data in mysql database... How to post unicode data using http post ? After using utf8encode from tnt controls I am doing it to post to PHP script <?php echo "Note = ". $_POST['note']; if($_POST['action'] == 'i') { /* * This code will add ...

'Exports' naming convention - how does it work?

What rules apply to the name that ends up in the exports section of an PE (Portable Executable)? Roughly, I see names starting with an '_' underscore, a '?' question mark or an '@' at-sign. What do those mean, and what about the rest of the name? Also - How can I reverse the naming convention into something more usable? ...

Is there any way to restrict how many item returned by CodeCentral Web Service

I am building web client for CodeCentral web service from CodeGear web site. I need to restrict number of items return by Search operation of CodeGear web service, say it, 10 per page. This way I can minimize loading of my web page. I just don't know how to do it. Any ideas? ...

Where can I find a "ESC/POS" Epson Barcode Test Program?

I am struggling to get an Epson "ESC/POS" printer to print barcodes (Using Delphi) and want to test if the printer is not faulty. Do you know where I can find a program to print a barcode in "ESC/POS"? I suppose as a last resort an OPOS program will also be OK. Also, a demo Delphi Program that works will also be fine. All the Delphi sni...

how to install nativeXML using Delphi 2009?

I`m using Delphi 2009 and want to operate some XML data. I heard that nativeXML is one of the most convenient ways to do it. so how can I install this library? ...

TDbComboBox doesn't change the first time it's changed.

I'm using D2009, and I have a TDbComboBox on my form, and if I click on it, then click an option from the menu, the first time I do so it doesn't change. The OnChange event handler fires, but ItemIndex remains at 0 (where it started at) instead of being updated to reflect the new item. After this first time, it works fine. Any idea wh...

Why the Excess Memory for Strings in Delphi?

I'm reading in a large text file with 1.4 million lines that is 24 MB in size (average 17 characters a line). I'm using Delphi 2009 and the file is ANSI but gets converted to Unicode upon reading, so fairly you can say the text once converted is 48 MB in size. ( Edit: I found a much simpler example ... ) I'm loading this text into a s...

Debugging problems with ‘WITH’ statement in Delphi 2006

Hi I am have a problem debugging code that uses a ‘WITH’ statement in BDS 2006 The debugger will not show the values of the variables with in a class or record. Am I doing something wrong or does BDS 2006 have a bug ? type TNumber = class Num: Integer; end; implementation {$R *.dfm} var MyNumber: TNumber; procedure TFo...

Preferred way to keep control centered on resize

What is your preferred way of keeping controls centered on its parent when the parent change width or height? ...

Disabling progress bar animation on Vista Aero

I'm using a Delphi 2009 VCL TProgressBar as a kind of "empty/full" gauge. On Vista, with Aero theme enabled, this has an animation associated with it, which is annoying and inappropriate for an gauge. Is there any way of disabling this (NOT by adjusting user's theme settings!) to prevent the animation on this control? Update: I under...