With the default settings, the Delphi 2010 code formatter folds anonymous methods on one line.
Is there anyone who has found settings to circumvent this?
Original code:
procedure TUnit.AppendFinalization(const StringBuilder: TStringBuilder);
begin
AppendMemberResults(StringBuilder,
function(Member: TGeneratableInUnit): IStringLi...
I downloaded the Firebird DBX driver from http://sites.google.com/site/dbxfirebird/ and I've been able to compile the "Test Connection" project and get it to run. I pointed it to my test DB like so:
procedure TMainForm.Button1Click(Sender: TObject);
var C: TSQLConnection;
begin
C := TSQLConnection.Create(Self);
try
C.DriverName...
I like to use large icons on my desktop, but very often they back to normal size, still can't trace why :).
As a programmer I decide to write my own utility for saving and restoring icons positions. Googling around doesn't give much info.
Can anyone give me a hint or point to link where I could start?
...
I was testing an app from Marco Cantu's Delphi 2009 Handbook. This app, called AnonAjax (page 200), has some interesting features to recognize certain elements from a Web page and list them. This app uses anonymous methods with an internal Indy HTTP client component used to access to a given URL. As part of this app's functionality, it l...
Within my program, I am composing an email to send using the default e-mail client software installed on a user's machine.
I have composed the mailto address, the subject, the multilined body, and I have several attachments to be included.
I almost got this working using mailto and ShellExecute as follows:
Message := 'mailto:someon...
I need a free component like RichEdit, but which can also show pictures inside. I am using Delphi 7. Unfortunately RichEdit cannot show pictures, and few components which can are not free.
...
I wish to get a TPanel or TImage to show a dimmed background (with a veil), anyone knows how to accomplish this in Delphi (2010)? I would prefer not to use a component if possible, just raw code.
The idea is that when showing a new form the parent one visually shows the user it's "disabled".
Something like this:
...
First off; I am not necessarily looking for Delphi code, spit it out any way you want.
I've been searching around (especially here) and found a bit about people looking for ways to compare to directories (inclusive subdirs) though they were using byte-by-byte methods. Second off, I am not looking for a difftool, I am "just" looking for ...
I built a custom control, and with theme support on it looks very strange. Is there any way to make it so that it will always draw with themes off, even if the application is built with theme support on?
EDIT: I found a way to turn theming off and it didn't help much. The problem is that it's a special button descended from TBitBtn, ...
Hi dudes,
I have a TWebBrowser object which is created in runtime and used in background, that is, not visible. The problem is that events like OnDocumentComplete dont work or are not triggered in Delphi2009. Any advice?
procedure TfrmMain.FormCreate(Sender: TObject);
begin
FWebBrowser:= TWebBrowser.Create(Self);
FWebBrowser.Regist...
In some projects, I have to deal with more than one programming language (for example a Delphi GUI application which communicates with an C# or Java app). The Subversion repository currently contains three top branches, one per language.
Should I change this and group all parts of the project in the trunk like in the following example ...
Hi,
I have a TList which stores some objects. Now I have a function which does some operations on that list:
function SomeFunct(const AIndex: integer): IInterface
begin
if (AIndex > -1) and (AIndex < fMgr.Windows.Count ) then
begin
if (fMgr.Windows[AIndex] <> nil) then
begin
if not Supports(TForm(fMgr.Windows[AIndex...
How can I have the pages in TRibbon right aligned?
bidiModeRightToLeft has no effect
...
Hi,
if I have a source of library written in C/C++ (lets say its libxml2), now I'd like to build it, and link it into the delphi application... I know it is possible, since Delphi Zlib does it ( http://www.dellapasqua.com/delphizlib/ ) ... But my question is, how to prepare those .obj files?
Thanks in advance
m.
...
Hi,
I compiled libxml2 with BCC 5.5 command line compiler, now I have lots of .obj files which I'd like to link into my Delphi application. Unfortunately, I get lots of "Unsatisfied forward or external declaration" errors, pointing to standard C library functions like memcpy, open, recv etc ...
What should I do to compile it correctly?...
Hi,
I use TMemo to display long strings. I was very surprised that method : Memo1.loadfromfile('mem.txt') [mem.txt = 111 kB] took about 35 seconds, what is really really long time.
How can I make TMemo load strings in real time?
thanx
...
On a Lazarus 0.9.28.2 project I have a TTreeView, with the name DirTree on my Form(frmConvert), but I want to populate it with all the directory tree, since C:\.
Like this:
And when the user select the directory, in the second TTreeView, with the name FileTree, appear all the files in that directory, but filtered to show only PDFs.
A...
Hi dudes,
How can I get the size (chars or Bytes) of a webpage loaded using TWebBrowser? I mean "size" as length of HTML content of a webpage loaded.
Thanks in advance.
...
I'm developing a program using Lazarus, that execute gcc:
var
AProcess: TProcess;
begin
if SaveDialog1.Execute then
AProcess := TProcess.Create(nil);
AProcess.CommandLine := 'gcc.exe ' + SaveDialog1.FileName + ' -o ' TextField23.Text;
AProcess.Options := AProcess.Options + [poWaitOnExit, poUsePipes];
AProcess.Execute;
AProcess.Free;
en...
I was wondering if there's a tool or a component for Delphi that can trace method execution line by line and create a log file. With this kind of tool it is easy to compare how method performs on two sets of input data by comparing two log files.
EDIT:
Let's say there is a function
10: function MyFunction(aInput: Integer): Integer;
1...