Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Newsgroups > Vista General

Vista - Activation Event missing in Windows

Reply
 
Old 09-10-2006   #1 (permalink)
Axel Dahmen


 
 

Activation Event missing in Windows

Hi,

I don't have Windows Vista currently available. Perhaps one of you might
afford the time to check this:

There's a bug in current Windows versions: When you start a program taking
some time to initialize, Windows is sending a first Activate event to that
program even if it is *not* activated at all.

This is the case when some other program has been activated by the user
between clicking the new program's icon and before the newly loaded program
has started its message queue loop.

This bug is particularly annoying on always-on-top applications, e.g. having
a semi-transparent effect changing its transparency depending on being
active.

Particularly .NET applications suffer from this bug as it often takes some
time to initilize the CLR.

Steps to reproduce the error:

* Open any application (e.g. Notepad), let's call it 'A'.

* Click the icon of any test program (='B') taking
some seconds to boot (e.g. MS Word).

* Before B's window appears on screen, activate A.

=> Although A is displayed as being active and has the keyboard focus, in
the task bar B appears as being active. Moreover, B has received an Activate
event making it believe it has the focus.


This is a Windows core bug, so a test program logging the Activate event can
easily be written in any language using any framework. In Windows API wou
might want to catch the WM_ACTIVATE event, in VB or .NET you may use the
Form_Activate event as well.

It's important to have the test program take some time before it creates the
message queue loop. In C# this is what I did:

[STAThread]
static void Main()
{
Thread.Sleep(3000);
Application.Run(new Form1());
}

private void Form1_Activated(object sender, System.EventArgs e)
{
lb.Items.Add("Activated");
}

Does this error still persist in Windows Vista? Then I suggest it should be
fixed now. There is no situation possible where fixing this bug may break
existing programs.

One more thing: When testing, I suggest you try to not have the windows of
program A and B overlap. Otherwise you might miss the effect when logging
events into B's window.

TIA,
Axel Dahmen



My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Windows Vista product key activation. Is it a 1 to 1 activation? Vista installation & setup
Event Viewer snap-in missing/broken Vista General
Missing DNS won't allow activation Vista General
Windows Event Log fails to translate event description. Vista General
Activation Event missing in Windows Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46