Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Setting Win32 Console app in foreground

Posted on 1998-12-22
2
Medium Priority
?
311 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
zyqwert earned 280 total points
ID: 1417557
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
ID: 1417558
I've found the same answer by myself ths weekend.
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

721 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