• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 497
  • Last Modified:

How do I force child window to foreground?

My application which is running under windows 95 at some point of time forces the child window to become foreground window. To do this SetForegroundWindow() is used. But now the same application under Windows 98 is not forcing the child window to come foreground. It just activates. Is there any difference in SetForegroundWindow() in windows 95 and 98. If so, what do to over come this problem?
0
jsreedhar
Asked:
jsreedhar
  • 3
  • 3
1 Solution
 
jsreedharAuthor Commented:
Adjusted points to 150
0
 
scrapdogCommented:
Ae you sure SetForegroundWindow is being called, and not SetActiveWindow?
0
 
jsreedharAuthor Commented:
Yes, SetForegroundWindow is used. In Win95 the rusult window is forced to become foregoundwindow whereas in Win98 it is not happening.
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
scrapdogCommented:
Is it a program you wrote?
0
 
scrapdogCommented:
Windows 98 and NT 5 have a new implementation of SetForegroundWindow that makes this difficult or almost impossible.  Instead of bringing the window to the foreground as Windows 95 did, the task bar blinks.  I think there are ways to get around this, like setting system hooks, or trick the system by simulating ALT-TAB, but you will have to check the following page to see for yourself.  I haven't tried any of these methods, but you can go to

http://msdn.microsoft.com/developer/news/devnews/mayjun98/drgui7_3.htm

to get more information...it might be very difficult, but this page will get you started by telling you what you have to do...
0
 
jsreedharAuthor Commented:
I didn't write the program. It is an application which I am testing on 95 and 98. And I found this behaviour, after debgging we came to know that problem is with SetForegroundWindow.

Thanks a lot.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now