473,387 Members | 1,553 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Foreground Window?

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?


Jan 18 '06 #1
1 2668
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.

"Terry Olsen" <to******@hotmail.com> wrote in message
news:up**************@TK2MSFTNGP10.phx.gbl...
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?

Jan 18 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: one2001boy | last post by:
Hello, I have an executable file lanuched from another application. is there a way to make thie executable file foreground if it is launched from other application? Thanks.
0
by: Tom | last post by:
Here is a very strange problem that I am stumped by. I have a rather large application written in VB.NET (of course) using Framework 1.1. As you know, with an MDI application you can have multiple...
4
by: fdmaxey | last post by:
I have a VB.Net windows application which must look as if it was embedded in a larger windows application. The 2nd application will not allow embedding of a VB.Net application - only ActiveX. ...
3
by: Carl Fenley | last post by:
I am trying to capture the Windows QueryCancelAutoPlay message that is sent to the "foreground window" when an AutoRun enabled CD is inserted into a drive. Enabling and Disabling AutoRun...
4
by: Carsten Schmitt | last post by:
Hello, I want to draw a simple pixel (i.e. a red pixel in the center of the screen), which is always in the foreground - even when running a fullscreen application like a DirectX game. I need...
1
by: kia | last post by:
Is there any way with JavaScript(I mean programmatically) that we can open the window as a new foreground tab, every time a new tabbed window is opened? For example, like IE7, when user clicks a...
2
by: Stephan Steiner | last post by:
Hi I need to start a GUI application from a console app. Upon startup, the application can display one or two popups, which need clicking away. I have all this handled using FindWindow,...
17
by: M O J O | last post by:
Hi, How can I force a form to the foreground no matter what application is in front? Thanks! M O J O
3
by: =?Utf-8?B?QUEyZTcyRQ==?= | last post by:
Given the handle of a window, is there a way to make it the foreground window using C# (rather than win32 API)?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.