Home > database >  In the window of the PB how to hide the taskbar
In the window of the PB how to hide the taskbar

Time:09-26

Each eldest brother!
How to hide task bar of a window, for example: we run Internet explorer, but not in the task bar IE this window, but also in the normal operation of the desktop, IE
Note, not hide the taskbar! To solve?
Thank you very much

CodePudding user response:

Function Long FindWindowEx (ph, Long Long ch, ref String cn, ref
String wn) Library "user32. DLL
"The Function Long ShowWindow (Long hWnd, Long nCmdShow) Library "user32. DLL
"
Use ShowWindow to show or hide the window, the second parameter is 0 means hide, for said shows that:
Handle=FindWindowEx (0, 0, "Shell_TrayWnd wn)//wn is empty string
ShowWindow (handle, 0)//hide the taskbar

CodePudding user response:

There is a simple way;
A, create two window w_main, w_pop, w_main for the main types of window, w_pop popup, w_main emulate set to false.
Second, in the open event of w_main open (w_pop);
Three, open in the application of the open (w_main);
Look at the effect ~ ~

CodePudding user response:

Should use API!

CodePudding user response:

reference 1st floor hyf_0023 response:
Function Long FindWindowEx (ph, Long Long ch, ref String cn, ref
String wn) Library "user32. DLL
"The Function Long ShowWindow (Long hWnd, Long nCmdShow) Library...


This will hide the whole task bar,

CodePudding user response:

Handle=FindWindowEx (0, 0, "Shell_TrayWnd wn)//wn is empty string
The function, how do I get a program handles,
For example, I was running a PB program, I want to get the handle to PB program in the task bar,
To the function of specific usage? Thank you very much

CodePudding user response:

References to the following content:
184270428
Brother (China)

http://topic.csdn.net/u/20101127/17/b963cb08-e5a6-40ad-980f-ecc39ef04d7c.html? 96773


Getwindowlong
Setwindowlong

WS_EX_TOOLWINDOW=0 x00000080l=128

How can not? :
Before you want to get a floating window, like QQ whirlwind is studied how to make the window is not displayed in the task bar, the method is very simple is the expansion of the window attribute set to WS_EX_TOOLWINDOW, MSDN for this property has a detailed introduction, the code is as follows:

: : SetWindowLong (m_hWnd, GWL_EXSTYLE WS_EX_TOOLWINDOW);

But then other extended attributes window or not, must be all have no, so you can use the following method to keep the window other extended attributes:

DWORD dwExStyle=: : GetWindowLong (m_hWnd, GWL_EXSTYLE);
DwExStyle |=WS_EX_TOOLWINDOW;
: : SetWindowLong (m_hWnd, GWL_EXSTYLE dwExStyle);

The code above does not achieve a goal, however, is still in the task bar has showed that later research found that only removes WS_EX_APPWINDOW this extended attributes to can fully achieve two purposes, the code is as follows:

DWORD dwExStyle=: : GetWindowLong (m_hWnd, GWL_EXSTYLE);
DwExStyle |=WS_EX_TOOLWINDOW;
: : SetWindowLong (m_hWnd, GWL_EXSTYLE dwExStyle & amp; ~ WS_EX_APPWINDOW);

I've seen the Internet is a way to create a hidden window, and then to the hidden window as the parent window to create a child window, yes, the task bar is not show, but you use ALT + TAB or see, to completely hide, this time only need to give the child window set a WS_EX_TOOLWINDOW properties,

The use of another WS_EX_LAYERED, when you need to modify the window transparency must add this property to a window,

Note: the above code can be added in OnInitDialog () test,

CodePudding user response:

Pop-up window in the task bar will not display
  • Related