5

I've been having some trouble with one of my Delphi 2010 projects lately. It seems that sometimes, when I have a form open as a modal dialog, the app stops showing up in the ALT-TAB list until I close the dialog. It's still in the Taskbar, but not in ALT-TAB, which means I can't switch to it without using the mouse.

Running under Windows 7, 64-bit. Has anyone seen this before? Any idea what causes it and how to fix it?

Mason Wheeler
  • 82,511
  • 50
  • 270
  • 477
  • It's probably not much help to you, but I see this from time to time with various apps on 64-bit Vista. I haven't realized if there is a pattern, but I haven't been watching that closely for one. – Ken Jun 14 '10 at 17:17
  • 1
    Does your project .dpr contain the "Application.MainFormOnTaskBar := True;" line? – Warren P Jun 14 '10 at 17:25
  • @Warren: It does. Is that part of the problem? – Mason Wheeler Jun 14 '10 at 17:38

2 Answers2

3

It's a Feature of Windows 7, and not a bug.

The solution is to either remove the 'Tool window' from the Dialog Properties, or to remove 'WS_EX_TOOLWINDOW' from the RC file.

Toon Krijthe
  • 52,876
  • 38
  • 145
  • 202
Vishnu Prasanth
  • 149
  • 1
  • 5
0

If you want to restore the expected Win XP behavior, just add a DWORD registry key named

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\AltTabSettings

And set the value to 1

You’re welcome :)

Ole
  • 31
  • 3
  • 3
    Don't use a global state to manage a local problem.[1] The end-user doesn't necessarily want all of their windows to suddenly act differently in alt+tab. http://blogs.msdn.com/b/oldnewthing/archive/2008/12/11/9193695.aspx (I know this post is old but I stumbled across it and I assume someone else could too) – 0x5f3759df Sep 01 '11 at 23:33