After reading the articles "Simmering Unicode, bring DPL to a boil" and "Simmering Unicode, bring DPL to a boil (Part 2)" of "The Oracle at Delphi" (Allen Bauer), Oracle is all I understand :)
The article mentions Delphi Parallel Library (DPL), lock free data structures, mutual exclusion locks and condition variables (this Wikipedia art...
I had a class that only worked in Delphi 7 and after several attempts of converting it into Delphi 2009 we finally agreed to change our project into Delphi 7.
The project more or less done, but I want to give the 2009 thing another shot.
Aside from Sizeof(Char) equals 1 in Delphi 7 and 2 in Delphi 2009, what are other changes that I n...
I'd like to start using generics and anonymous method, mainly to learn what that's all about and why I would want to use them.
Having Delphi 2009, I often read that generics and anonymous methods are not completely implemented or buggy, which was fixed in Delphi 2010.
I would like to avoid having to wonder if it's my fault or a bug in ...
When compiling code without initializing a THandle the Delphi 2009 compiler gives a warning of the variable not being initalized. Is there any need to initialize these THandles? If you need to init. them do you need to also free a THandle when you no longer need it?
...
Problem
If the text in TRichEdit is something like this;
'hello, world'#$D#$A
Then the following routine displays TRUE. However when the RichEdit has
'test'#$D#$A#$D#$A'test'#$D#$A#$D#$A'test'#$D#$A
Then the routine displays FALSE. It seems to me to be flawed as it is finding the comma's but not the newlines/linefeeds. I created ...
I need to make a control a conainter(that holds other controls at design and run time) similiar a TPanel, without inheriting from the custom panel or a similar control, how do i tell my control that its suppose to contain stuff???
...
I need to change the old Win98 short path names to long path names. I had a routine that worked fine with Delphi 4, but when I upgraded to Delphi 2009 and Unicode, it didn't work with Unicode strings.
I looked around and couldn't find a Unicode-compatible version of it.
It appears that the correct routine to use is GetLongPathName from...
OK, here is the complete code for the Splashbar.pas, still have three progressbars, as I want to see what they look like before I choose one. It also includes some stuff that's disabled, as I can't get them to work.
unit Splashbar;
interface
uses ExtActns, Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
...
We tried ServerCharSet=utf8 and ServerCharSet=UTF8, based on information found in newsgroups - but still, special characters / Umlauts do not appear correctly in the client data.
We use Delphi 2009 and the built-in dbExpress driver. Field data is retrieved using AsWideString.
...
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
IdHTTP, IdIOHandler, IdIOHandlerSocket, IdIOHandlerStack,
IdIntercept, IdCookieManager, IdZLibCompressorBase, IdCompressorZLib, IdSSL,
IdSSLOpenSS...
Hello everyone. I need some info about OleContainer. I embedded an OleContainer in the browser. And when I launch that html file,a microsoft word OleContainer is opened and I want to display content of a doc file from the web. For example, when I open html file, OleContainer should view the content of the www.example.com/example.doc whi...
Hi,
We want to restrict files being saved to the virtual store in Vista/Windows 7 if the user tries to save files from our application to a protected folder such as "Program files" - we want an "Access Denied" message displayed if the user tries to do this. Is there a way to do this from our Delphi 2009 app similarly to what MS Word et...
I need to add at runtime to an inmemory image 15 lines of transparent pixels on top and 20 on the bottom.
The images are loaded in a TcxImagelist (from DevExpress Express Library), they can be therefore retrieved as 32bit bitmaps.
If the image is 400x75 after the manipulation should be 400x(75+15+20) = 400x110
How to perform this task...
Hi guys,
I just discovered a bug in tidhttp component. The scenario is this, im creating a small to fetch the pages of website using tidhttp get. I tried it in ebay all is ok, now after ebay i tried amazon thats where i encountered a problem. What happenned on my side is i searched for item "lenovo laptop" in amazon and copied the url o...
I am using Delphi 2009.
On a huge project 300+ units, 5 third party components, many libraries, very often the IDE gets frozen for seconds, very often when "intellisense" (I don't remember how it is called) tries to give me suggestions.
Is there a way to improve the performance?
I will try also the following improvements:
1) format m...
Showing 2 secondary forms from the main form and then closing both forms will cause the main form to lose focus. (another application gets activated instead of mine)
The secondary forms are created either by the Main Form directly or by creating the third form from the second form.
The secondary forms set caFree in the OnClose event:
...
I want to make a report with a TDbxReader instance but don't find the way to get the name of aReader.value[index] column. Somebody could help me?
aCmnd.Text := 'SELECT * FROM Country';
aCmnd.Prepare;
aReader := aCmnd.ExecuteQuery;
aColCount := aReader.ColumnCount;
Writeln( 'Results from Query: ' + aCmnd.Text );
// wr...
I am trying to remotely read a binary (REG_BINARY) registry value, but I get nothing but junk back. Any ideas what is wrong with this code? I'm using Delphi 2010:
function GetBinaryRegistryData(ARootKey: HKEY; AKey, AValue, sMachine: string; var sResult: string): boolean;
var
MyReg: TRegistry;
RegDataType: TRegDataType;
...
I was able to build one application up to this morning, then I don't know what happened as I try to build I have
[DCC Error] myunit.pas(1710): E2056 String literals may have at most 255 element`
Why this if this was working? (1710) was not edited in last month. I checked with a colleague project options and environement options one by...
Up until Delphi 2007 I was using DelphiZlib 0.2.99 for decompressing gzipped files. In Delphi 2009 the library does not compile anymore. Besides the conflict with Delphi's own zlib.pas unit, the code generates a number of string-related compiler errors and warnings which I don't think I can fix without a close understanding of the librar...