Questions tagged [showwindow]

Winapi function that manipulates Windows window display options. It shows, hides, maximalises and minimalises window by HWND handle passed to it. This is windows only function.

showWindow is member of winAPI.

Syntax:

BOOL WINAPI ShowWindow(
  _In_  HWND hWnd,
  _In_  int nCmdShow
);

Parameters:

(int) hWnd
Window handle

(int) nCmdShow
Display mode. There are constanst defined for display mode. Zero (0 - SW_HIDE) results in window being completely hidden.

Code example:

Hide console window:

ShowWindow(GetConsoleWindow(), 0);   //Console window must exist

More info

More info on Microsoft web page.

55 questions
0
votes
0 answers

ShowWindow is not called when parent window is maximized

I have a modal window(1st window) inside which another window(2nd window) gets called, when 1st window is maximized it does not call for ShowWindow() function which in turn 2nd window is not launched by default and secondly when the 1st window is…
0
votes
3 answers

How to restore an application from the SysTray? ShowWindow doesn't help since the Handle=0

Is it possible to restore a 3rd Party application which has been minimized to the SysTray? Calling ShowWindow is fine on apps minimized to the TaskBar but where the app has been minimized to the SysTray it appears its handle gets set to zero, and…
hawbsl
  • 15,313
  • 25
  • 73
  • 114
0
votes
2 answers

(Cocoa Mac) NSWindowController showWindow allocates/initializes a new NSWindowController?

I have a class BrowserWindowController that extends NSWindowController. My app delegate has a BrowserWindowController that it allocates, initializes, and points an instance variable at when the app is launched. Then, it displays its window. The goal…
sudo
  • 5,604
  • 5
  • 40
  • 78
0
votes
1 answer

Maximise left and maximise right for a WIN32 application

I am creating a WIN32 application. Is there a way I can change the window so that it can maximise to the left or right, as if you pressed win + right arrow or win + left arrow? I've tried using the ShowWindow() method, but none of the parameters…
JessMcintosh
  • 460
  • 2
  • 6
  • 21
0
votes
1 answer

'showWindow': identifier not found with included

I have included in my project. But I seem to be unable to call showWindow and getConsoleWindow anyway. #ifdef _WIN32 #include bool consoleButtonCallback(void* but); #endif /*tons of code here*/ /* ... */ #ifdef…
Tomáš Zato
  • 50,171
  • 52
  • 268
  • 778
0
votes
1 answer

Custom Shell Fails to run ShowWindow

I am running a custom shell Test.exe instead of Explorer.exe which launches a full screen application when the user logs in. However, that application is unable to execute ShowWindow commands (minimizing or hiding) on itself. It works fine when the…
0
votes
2 answers

ShowWindow alternatives

Obviously I can't terminate a given process, when its main window is hidden ("minimized to tray"). So I tried showing the window again in the other processes' FormClosing handler. Didn't work either. Now I want to use ShowWindow IntPtr Handle =…
-1
votes
3 answers

Powershell newcomer

I am a total new comer to powershell so please forgive me if my question sounds stupid. I found the script below from Yuri Posidelov which I tweaked to activate a process and show the window and send keystrokes to shut down the process which works…
-1
votes
1 answer

Doesn't work ShowWindow Run As Administrator

Iam writing a program for hide target program , actually its working but , when I run the program as administrator , showWindow function doesn't work.How can I solve this problem? private void button1_Click(object sender, EventArgs e) { …
cezaalp
  • 35
  • 1
  • 6
-3
votes
1 answer

C# showwindow is not working(#32770 (Dialog))

32770 The class for a dialog box. I connect to the my pc with chrome remote desktop. img : https://social.msdn.microsoft.com/Forums/getfile/1410849 How can I hide it? Process[] Memory = Process.GetProcesses(); foreach (Process prc in…
1 2 3
4