October 7th, 2009, 01:21 PM
WPF Window.Activate() Returns False
We've got an application that, when started, displays a login window. We'd like the window to be the active window, and the focus to be on the username textbox. We call the Activate() method in our overridden OnContentRendered method, which works fine most of the time, but sometimes it fails, and returns false. In particular, it seems to always fail on virtual machines. In cases where it fails, the application doesn't have focus (even if we set up our Login form to be top most) but the button in the task bar flashes.
Does anyone know what might cause the Activate() method to return false ?
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!