Joe White’s Blog

Life, .NET, and Cats


A way to tell if an app was written in Delphi

I’m often curious about whether an app I’m using was written in Delphi. Here’s an easy way to tell, that works most of the time.

(Note: this won’t work for apps that use Delphi 2007’s new Vista-compatibility MainFormOnTaskbar property.)

All you do is right-click the taskbar button. Non-Delphi apps will have an ordinary window menu:

Taskbar right-click menu for a non-Delphi application, with the usual window menu items

Delphi apps have an abbreviated menu instead, because it’s actually the context menu for the invisible TApplication window, instead of the context menu for the form:

Taskbar right-click menu for a Delphi application, with only Restore, Minimize, and Close

This isn’t true just of Delphi for Win32 — it also works for VCL.NET applications. (It’s VCL-specific, though, so you can’t identify a Delphi/.NET WinForms app this way.)

If a Delphi app does use Delphi 2007’s MainFormOnTaskbar, then it will have the normal window menu, so a normal menu doesn’t necessarily mean it wasn’t written in Delphi. But if you right-click the taskbar button and do see only Restore, Minimize, and Close, it’s a pretty sure thing that it’s a Delphi app.

13 Responses to “A way to tell if an app was written in Delphi”

  1. stanleyuxu2005 Says:

    There are some other ways:
    1. Tooltips do not have a black edge on WinXP. They look totally different on Vista.
    2. If a Menu is associated with an ImageList, shortcuts of MenuItems are not left-aligned but right-aligned.
    3. If a sub-dialog is present, press ALT+4 will not close this dialog, but the application. (In some cases)
    4. If you update visual styles on WinXP or Vista, application (made by Delphi) might properly throw an exception.
    more..

  2. Thomas Mueller Says:

    Hm, yes, that’t probably a way to find out if a program is written in Delphi. Unfortunately there will always somebody to point out that this is identifying it by one of its (many) flaws…

  3. CR Says:

    stanleyuxu2005 - well, at least both the taskbar menu and the hint windows at least can be fixed very easily in only a few lines of code.

  4. John J Says:

    One of the most fool proof ways is to do a search of the binary executable for the ascii text ‘delphi’. In the applications I have checked and written in Delphi 5, 7, and 2007, “Delphi” is in the executable.

    A free simple text in file and file search:

    http://www.jcitssystems.com/FileSearch.htm

    John

  5. RIF Says:

    You can also check if the app is listed on the Delphi Wiki Good Application list.

    In case the app is not listed, there is a link to another on how to detect Delphi apps. If you find another good app please add them to the list.

    Doei RIF

  6. Steve Moran Says:

    Has anybody in the history of the world ever used Size or Move from those menus? I haven’t. It’s a case of “less is more”. Thanks for the tip.

  7. stanleyuxu2005 Says:

    To CR: You mean that the two issues can be fixed in couple of lines. I have made a patch for tooltips. Do you mean the same solution, or some more smarter solution? The taskbar menu issue is not that easy to be fixed. Even D2007 has couple of related issues with this. Could you tell me more details? Here or in my blog. I will be very appreciated.

  8. Barry J Says:

    @Steve Moran: I use “Move” in those cases when an application’s settings are screwed up and it opens off-screen. Alt-Space, one down-arrow, then mouse the app to the screen.

  9. Shawn Says:

    I use Windowse ( http://www.greatis.com/delphicb/windowse/ ) in Class view and look for Delphi classes.

  10. Steve Trefethen Says:

    Hey Joe,
    Thanks for the link! :)

  11. Larry Hengen Says:

    I find the easiest way to find out if an application was written in Delphi is to fire up Spy++ and look at the window class names. If they start with TXXX you can be sure it’s written using the VCL.

  12. Abdilla Says:

    Use peid! it is the most easy solution to know which compiler a program is compiled in.

  13. Abdilla Says:

    Here is peid >> http://www.peid.info/files/PEiD-0.94-20060510.zip

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


Joe White's Blog copyright © 2004-2008. Portions of the site layout use Yahoo! YUI Reset, Fonts, and Grids.
Proudly powered by WordPress. Entries (RSS) and Comments (RSS).