Foreground Window?

T

Terry Olsen

In my chat application, I create a new window for each private chat. I use
the FlashWindowEx API to flash the window if it's not the Foreground window.
I determine the Foreground window using the GetForegroundWindow API. So in
each window I have a line like such:

If pvchat.Handle.ToInt32 <> GetForegroundWindow Then
WindowFlash(pvchat.Handle.ToInt32)

The FlashWindowEx API is optioned to continuously flash the window until it
becomes the foreground window.

This works well with the main chat window. If it's not the foreground
window, or it's minimized, it continuously flashes until I bring it to the
front. However, the spawned private chat windows flash once and return to
normal. Does the spawned window somehow have the same handle as the main
window?
 
T

Terry Olsen

I've also discovered that if I minimize the main window, then the spawned
window remains flashing until either the spawned window or the main window
is brought back to the foreground. This is baffling to me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top