delphi

setting the lineend styles for Canvas.LineTo

Is there any way to set the style for the lineends for the TCanvas.LineTo method? It seems to default to rounded ends, which looks very bad for several lines in a row of different colours when Pen.Width is set to a large value (e.g. 9). It looks like this (rounded ends): ********........****** **********........****** **********.........

Delphi(2006) Loop Help

So What I'm essentially trying to do is have something happen 70% of the time, another few things happen 10% of the time each if that makes sense but my app doesn't seem to do any of the actions I'm guessing I'm misunderstanding the loop syntax or something, anyway if anyone could take a look and maybe give me some advice per1 := 70; pe...

What's a good way to serialize Delphi object tree to XML--using RTTI and not custom code?

What's a good way to serialize a Delphi object tree to XML--using RTTI and not custom code? I would have loved to find that this feature is already built into Delphi, but it doesn't seem to be. I've found a few components (posted, below) that seem like they might perform this function. Have you used any of them or some other offering?...

Delphi Profiling tools

Hi I am having some performance problems with my Delphi 2006 app. Can you Suggest any profiling tools that will help me find the bottle neck i.e. A tool like turbo Profiler ...

BDE vs ADO in Delphi

Please note the Edit below for a lot more information, and a possible solution We recently modified a large Delphi application to use ADO connections and queries instead of BDE connections and queries. Since that change, performance has become terrible. I've profiled the application and the bottleneck seems to be at the actual call to...

Where are all the Delphi Developers?

Stack Overflow has a pretty good Delphi community. I am curious however where else Delphi developers are hanging out. I am looking for programming related community sites. Obviously Forums.CodeGear.com is a popular place. Where else? One of the reasons I ask is I was looking at Refactor My Code and noticed there is no Delphi cat...

How do I start with working Sub-Version + Delphi?

Hi there, I'm new to this SCM, but since SVN is gaining popularity I was going to give it a try. Things I noticed: SVN is only the backbone of the SCM, no front-end? Why is there several versions of Windows Binaries? Tigris? SlikSVN? VisualSVN? Do I need a Web Server like Apache in order to use SVN? There's dozens of front-end, Torto...

Delphi 7 and events

I'm researching a bug that looks like some kind of timing issue and so I'm a bit curious about how events work in Delphi 7. What happens is we get some data sent to our application through a COM interface and it gets handled in an event raised from the COM thread. It seems like the event, which has quite a bit of code in it, takes longer...

Are there any podcast about Delphi ?

Were can I find some good Podcasts that talk about program with Delphi & the whole software lifecycle ...

How can I remove the images in the TIWTreeView component in D2007?

How can I remove the default images on the TIWTreeView (in Delphi 2007)? The closed book, open book and the leaf page images. I know I can set them to other custom images, but when I try even just a 1x1 blank image it leaves a 16x16 space for the image. I just want the (+) and (-) images in the tree, with no open/closed/leaf graphics....

Any idea how to resolve a BDE error $251e?

Here's the situation: A user of our program suddenly started receiving an error from the Borland Database Engine (BDE) when attempting to start the application. The error message says that it was unable to initialize the BDE and gives error code $251e. User is on BDE 5.2.0.2. I cannot find any official documentation on the error $251...

A little help with a delphi loop

for m := 0 to 300 do if Pos(certain_String, string(arrayitem(m)) <> 0 then begin randomize; x := random(100); begin case x of 0..69 : function(m); // 70 percent 70..79 : function(m+1); // 10 percent 80..84 : function(m+2); // 5 percent ...

How Can I Best Guess the Encoding when the BOM (Byte Order Mark) is Missing?

My program has to read files that use various encodings. They may be ANSI, UTF-8 or UTF-16 (big or little endian). When the BOM (Byte Order Mark) is there, I have no problem. I know if the file is UTF-8 or UTF-16 BE or LE. I wanted to assume when there was no BOM that the file was ANSI. But I have found that the files I am dealing wit...

What religion is Delphi?

I found a very funny list on a blog post: If programming languages were religions. It's funny, tongue-in-cheek, and not to be taken seriously. But they left off my language, Object Pascal. And I can't really think of a religion that fits. Anyone have any ideas? (NOTE: This is a purely subjective question, just for humorous purposes ...

Create a 2 dimension Quickreport

I think im asking for the right type of report from Quickreport. What we have is a simple table, gauge,site,value Gauge and site are the keyfields, (there could be anynumber of Gauge-Site Pairs) normally there is only at most, about 10 sites. and we are looking to get a reports that looks like this site1 site2 site3 ga...

What Simple Changes Made the Biggest Improvements to Your Delphi Programs

I have a Delphi 2009 program that handles a lot of data and needs to be as fast as possible and not use too much memory. What small simple changes have you made to your Delphi code that had the biggest impact on the performance of you program by noticeably reducing execution time or memory use? Thanks everyone for all your answers. M...

Finding available LPT (parallel) ports and addresses in Delphi

Hi, I am doing direct I/O on a parallel port which is fine and necessary for speed. I would like to enumerate the available ports to offer the user a choice of ports at setup time rather than a tedious trawl through device manager to read the address manually. Does anyone know a means of doing this please? Many thanks, Brian ...

How can I make Delphi 2009 open my application in the second monitor by default?

When debugging I always want Delphi to open my application in the second monitor but it always open in the first one, I know I can save the application placement before closing but I want it to always open in the second monitor when in debug mode. Is there some way to configure delphi 2009 to do that? ...

Is WideString identical to String in Delphi 2009

I'm getting some weird behaviour recompiling some applications in 2009 that used widestrings at various points. In a Delphi 2009 App is Widestring identical to String? ...

How do I create a custom control with a sub-panel that accepts other controls at designtime?

I have written a custom control, that has several sub panels. I want these sub panels to accept any additional controls dropped on them at design time. Unfortunately any control that gets dropped at design time ends up on my custom control, not on the panels. This shows in particular if I try to drop a label: The label's blue dots are s...