Solved

Setting Win32 Console app in foreground

Posted on 1998-12-22
2
286 Views
Last Modified: 2013-12-03
I want to get an NT console application running in full screen mode in foreground. SetForeground window works only if the application is not in fullscreen mode.
Any ideas ?
0
Comment
Question by:HERESON
2 Comments
 
LVL 2

Accepted Solution

by:
zyqwert earned 70 total points
Comment Utility
This worked for me on NT.

When you alt+tab away from a full screen console mode app, it is minimized, so a SetForegroundWindow will bring it to the foreground, but it will still be minimized.  To get it back in sight, tell it to show itself with ShowWindow:

case WM_LBUTTONDOWN:
{
   // I assume you know exactly which console window you want.
    HWND h= FindWindow("ConsoleWindowClass", NULL);
    SetForegroundWindow(h);
    ShowWindow(h, SW_MAXIMIZE);
}

0
 

Author Comment

by:HERESON
Comment Utility
I've found the same answer by myself ths weekend.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now