Monthly Archives: January 2007

Quick Tip: FullRepaint and fixing flicker in a Delphi VCL app

Here’s a quick tip: when your looking to fix flicker problems in a VCL application be sure you check the FullRepaint property of any TPanel container components used to control form layout. Recently, while working on one of my pet peeves in the IDE, flicker during a window resize, I found the aforementioned property to be the culprit on more than one occasion. The IDE’s editor window is a fairly complicated nesting of (essentially) TPanel components used for docking and client aligned sizing and digging into these panel’s I found several of them had FullRepaint set to true. A quick property toggle and rebuild of coreide (an IDE package) and the problem was fixed.

There are still a few, much smaller issues remaining but since this issue affected the code editor, embedded designer and Welcome page fixing it has made a big difference.

[UPDATE: May, 2008] Related posts:

Using the WS_EX_COMPOSITE window style to eliminate flicker on Windows XP
Quick Tip #2: Fixing flicker caused by WM_ERASEBKGND in a Delphi VCL app

Old Borland homepages wiki content has been moved

I just completed moving the content from my old wiki on Borland’s homepages server to stevetrefethen.com/wiki. Most of the content related to ActionBands and dated back to Delphi 6 & 7. There is also a Delphi IDE Editor shortcut table which lists some of the most useful shortcuts by feature.

For reference the old URL was http://homepages.borland.com/strefethen though all traffic has now been redirected. If you have saved an old URL be sure to check out the list of all pages for the new content location.

Blog search engine optimization basics

I’ve been blogging for several years now and along the way I’ve learned a few things about SEO or Search Engine Optimization (a fancy way of saying “Enabling people to find you”). Here is a short list of things you can do right away:

  • Add the following meta tags to your site’s <head> element (for an example check out the HTML source of this page on my site)
<meta content="<list of keywords here>" name="KEYWORDS" />
<meta content="<description of your site here>" name="DESCRIPTION" />
<link rel="alternate" type="application/rss+xml" title="" href="" />
<link rel="alternate" type="application/atom+xml" title="" href="" />

  • Write clear, searchable page titles, in fact, here is a post where I go into much more detail on this topic
  • Use header tags for blog entries within your site template
  • Use FeedBurner for your RSS feed so you can send out a pingshot and notify all the major search engines at once that you have new content
  • Use a blog engine that supports all of the above, my old blog engine didn’t support any of this
  • Use Google’s WebMaster Central and read the Official Google Webmaster Central Blog and in particular read this post
  • Provide a page that explains how to subscribe to your site feed
  • Added your site’s URL to your email signature/newsgroup signature. FeedBurner even supports the headline animator for a signature like this:my blog
  • Lastly, read other people’s blogs, link to them, leave comments on them or as they say in the blogosphere some “link love
  • If you include images in a post be sure to specify the alt attribute to help search engines identify and thus index the image

Of course, there are plenty of other things one can do though hopefully this list will get you started.

So, why talk about this? Well, I just read this post by Primoz Gabrijelcic (via this post by Craig Stunz) which talks about the lack of a good place to advertise a Delphi blog. I peeked into the markup for Primoz’s site and noticed he could utilize a number of these techniques which should, over time, help improve the visbility of his blog.

[UPDATED: Mar 21, 2007] Added bullet items for including alt attribute on image links

Five Things You Didn't Know About Me

I’ve been tagged by Nick Hodges and Dan Miser so I guess it’s my turn…

  1. I’m the only Delphi R&D team member into weight lifting. I work out at Dave Draper’s World Gym here in Scott’s Valley.
  2. I wound up on the University of Maine track team after one of the coaches approached me while I was fooling around dunking a basketball in the field house one day. I came within 1/4″ of the UMaine high jump record (at the time) of 6′ 10 1/4″.
  3. I grew up in Maine in the snow yet I’ve never been downhill skiing. Instead, I played hockey. Go Black Bears!
  4. I gave blood for the first time last year through the Stanford Blood Center, something I now plan to do regularly. My blood type is A negative.
  5. I come from a family of five, four of whom are left handed including me.

I think pretty much everyone I know at who blogs has either already written a similar post or has been tagged so I guess I’m going to break the chain.

Tell me about your Delphi Open Source solution

I’ve been meaning to do this for awhile now and given the recent mention of OmniXML, an Open Source Delphi XML parser, in a comment to a previous post now seems as good a time as any. If you’ve got an Open Source Delphi project that’s available for download leave a comment here with a link to the download and I’ll collect them and post them to an article page here on my blog.

UPDATED: Ok it’s live, here is my Delphi Open Source Projects page.

Updated blog layout and color scheme

After nearly three months of a black/dark grey theme I’ve updated my blog with some layout changes and a whole new color scheme. Drop by, have a look and let me know what you think.

One tool I used quite a bit for the new color scheme was this Color Contrast Analyser which I think worked pretty well allowing me to improve the overall contrast on my site. The only thing left is to update my site icon colors.

Microsoft releases XmlLite a high performance unmanaged XML library

As I was browsing the other day I ran into XmlLite which is a light weight high performance XML library from Microsoft. The docs say “XmlLite is most appropriate for use with C++” which makes it a perfect candidate for usage from Delphi. The only down side is that MS doesn’t provide a type library so the header file needs to be translated. Additionally, the library is only available with the Windows Vista SDK.

Delphi ASP.NET AJAX demo fixed on CodeCentral

Doh! I just realized one of the Delphi ASP.NET AJAX demos I posted to CodeCentral is missing the actual download zip file. I just fixed the problem so if you’re interested you can get it here:

Updated: I just uploaded both of these demos to my website so now you can actually see the Delphi versions live (yet another advantage of hosting my own blog). Here are the links:

Update: Fixed the spelling of Delphi in this blog entry (doh!)

Presentation on Agile projects in a Waterfall enterprise

Tomorrow, SD Times is hosting a free online seminar at 1pm PST called “Bridging the Gap: Successfully Managing Agile Projects in the Waterfall Enterprise” that I plan to watch. Up until last year the Delphi team had used Waterfall, or perhaps more accurately a Waterfall-like, development process which has seen both ends of the success spectrum. Over the past few months I’ve posted a number of times about using Agile and discussed some of the things the Delphi team has been doing related to Agile, continuous integration and automation. I recently remarked that I’m not entirely sold on Agile and perhaps this presentation will address some of the issues.

Anyway, I thought it was worth mentioning as it seems interesting and I’m always looking for fresh ideas to improve our development process.

Why the Delphi debugger might fail to stop at your breakpoint

There are a number of reasons Delphi’s debugger might fail to stop at a breakpoint you set. I’ve seen this issue mentioned time and again on the public newsgroups and I thought it might be worth posting a quick list off the top of my head:

  • The .pas file you’re debugging has is missing line feeds. Be sure that your file has correct CRLF characters at the end of each line.
  • You have compiler optimizations turned on. Occaisonally, compiler optimizations may cause your code to execute in an unexpected order. Be sure to turn optimizations off and stack frames on.
  • You’re looking at a source file that’s not actually compiled/linked into the active project. This can happen as a result of copying a file from one directory to another and your project desktop reopens the file from the old location. One quick way to tell is add a syntax error and compile the code, if it doesn’t stop on the error then you’re looking at the wrong file.
  • You turned off Debug Information and Local symbols options. Of course, these are a lot less likely but still possible.

Ok, that’s all for now. Let me know if you think of anything else and I’ll update the list.