delphi-2010

Delphi 2010 Leave My Comments Alone

The code formatter in Delphi 2010 is a useful tool for developing coding standards, or at least this is my opinion, however it has a horrid habit of ruining comments. A nicly commented block like this.. SomeFunction(SomeVaribleWithALongName, // Comment Option2, // Comment ...

Delphi 7 compared to 2009 (& 2010) Record sizes

Hi There... I have a weird issue when converting code from Delphi 7 to 2010. It has to do with records. The record defined below, when sized in D7, is 432 bytes, and in D2009 (and 2010) it's 496. I know, that an easy solution is to make it a packed record, then all versions come out to 426 bytes... However, we have data stored where ...

who/what deletes the print job?

Having a strange problem where a print occasionally is not being printed The scenario is that we print barcode labels with a barcode printer (Zebra LP2844). Printer is plugged into the TerminalPC and then shared. Printer->TerminalPC -> Terminal Server. Session on TerminalServer is using Printer as \TerminalPC\Printer When logging prin...

How to format StringGrid cell borders

I am trying to format a Delphi TStringgrid depending on cell contents and position. Whilst I can change the cell colour and shape depending on the cell contents I am having more problems with the cell borders. I want to be able to have a thicker cell border on one side or the other every n columns Any pointers? Cheers Dan ...

How can I scroll the content of a TFlowPanel ?!?

Delphi implementation of the TFlowPanel control seems to lack an important feature of the C# version, the AutoScroll one. The C# control with AutoWrap= False and AutoScroll=True behave like a horizontal scrollable list of controls. How can i mimic the behavior of the C# version of the control ? Thanks, Alin P.S. I know i can use TS...

Got a big problem: TDictionary and dll in Delphi 2010!

Hi, I got a very serious problem when I'm trying to access TDictionary variable in host program from a dynamicly loaded dll. Here is the complete code, anyone can give some help? thanks! ===========main program project source code=================== program main; uses ShareMem, Forms, uMain in 'uMain.pas' {Form1}, uCommon in...

Problem comparing strings in Delphi 2010

I'm slightly confused and hoping for enlightenment. I'm using Delphi 2010 for this project and I'm trying to compare 2 strings. Using the code below fails if AnsiStrIComp(PAnsiChar(sCatName), PAnsiChar(CatNode.CatName)) = 0 then... because according to the debugger only the first character of each string is being compared. I.E. if s...

Can I build WCF servers using Delphi 2010?

We would like to build new application as multi tiers, we can do it as web service, but we prefer to use more advanced features as WCF, which not found in datasnap too. can we do that with Delphi 2010 win32? the clients will be Delphi win32, Asp.Net (C#) and maybe windows mobile phones too. ...

Infernal Libraries (aka DLL Hell)

In a Project of mine, I use a Delphi Application which dynamically loads a wrapper DLL (exporting C-Style functions) which in turn is statically link against a bunch of 3rd party DLLs. It works fine on my test machines, but on my customers computer it failed to initialize with an error Message like "Couldn't find entrypoint _somefunctio...

Is there a Boyer-Moore string search and fast search and replace function and fast string count for Delphi 2010 String (UnicodeString) out there?

I need three fast-on-large-strings functions: fast search, fast search and replace, and fast count of substrings in a string. I have run into Boyer-Moore string searches in C++ and Python, but the only Delphi Boyer-Moore algorithm used to implement fast search and replace that I have found is part of the FastStrings by Peter Morris, fo...

Is there no SERVER NAME Parameter for BDE in Delphi 2010?

We are migrating a pretty big application crafted in Delphi 5 (still getting customers using this old versions) that uses BDE to connect to a SQL Server. The decided path to migrating is first Delphi 5 to Delphi 2010, then BDE to dbExpress (or dbGO, still undecided). The problem is that BDE in Delphi 2010 doen't seems to have SERVER NA...

OpenGL: Increasing the number of the lines changes the antialiasing?

I am writing a paint program in Delphi. The user clicks 2 points on the screen and a line is drawn between them. I want the lines to be anti-aliased. I put this code in create() procedure of the OpenGL class (which is called just 1 time in the start): glEnable(GL_LINE_SMOOTH); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINU...

Why does IOHandler.ReadStream blocks thread when client connects to server in Indy?

Hi, Today I faced a weird behavior using Indy 10 (shipped with Delphi 2010). Here is the problem: Suppose we have a IdTcpClient in our client, and a IdTcpServer in our server app, and this code in OnExecute event-handler for our IdTcpServer: procedure TForm1.IdTCPServer1Execute(AContext: TIdContext); var AStream: TStringStream; S:...

Delphi 2010 Access Violation with notnetcoreide140.bpl

I cannot install/compile any component where I create the .dproj file on my machine. I get an access violation error. this is even when I have added absolutely no code to a component frame or ActiveX component. When I save the project and attempt to reopen it, I get an error telling me that the .dproj file has white space at line 26, ...

Delphi: Free TSynEdit replacement

Hello. What's the best free replacement for TSynEdit? As I can see, it is developed very slow. Want to find some replacement for it. Or, may be, the version from another maintainer. Need Delphi 2010 compatibility. ...

Why does my program crash when I destroy a button in its own OnClick handler?

I tried a script from a web site I run http://www.delphi-central.com/runtime.aspx and succeed. private { Private declarations } procedure CustomButtonClick(Sender: TObject); procedure TForm1.AddNewButtonClick(Sender: TObject); var NewButton : TButton; begin NewButton := TButton.create(self); with NewButton do begin...

Delphi chars are now stored with 2 bytes rather than 1 in typed binary files. How can I still read my old files?

I maintain a Delphi program which uses typed binary files as its native file format. After upgrading from Turbo Delphi to Delphi 2010, all chars in the record type being stored started being stored with 2 bytes rather than one. The data types being stored are char and array[1..5] of char. So before, part of the file looked like: 4C 20...

What is TMonitor in Delphi System unit good for?

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

Datasnap Service application fails

I have created a Datasnap service, using Bob Swart's white paper as a guide. I have been debugging and deployed succesfully using the VCL Forms application as a server. But when I try to deploy the service version, it installs ok, I then try to start the service and it immediately stops. The error in the event log would suggest that t...

How to show this splash screen for 3 seconds?

Hello, I created my splash screen using the method mentioned here: http://delphi.about.com/od/formsdialogs/a/splashscreen.htm I need to show the splash screen for 3 seconds before showing the main form. Please help. Thanks. ...