简体   繁体   中英

Call Show windows side by side in C#

Dumb question is there an easy way to clear to the desktop and then open two explorer windows and call the "Show windows side by side" task bar call ? Just wondering if there is an api in an MS library way to do this.

A lot of API functions can be easily found on MSDN Dev Center. Without having worked with the Win API much, this is where I would start:

  1. Get collection of Windows with EnumWindows or EnumChildWindows
  2. Manipulate Window State with ShowWindow or TileWindows

You can use the TileWindows WinAPI function via p/invoke to resize the desired windows to side-by-side.

To hide all other windows, just enumerate through them and minimise them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM