如何最大限度地在后台窗口? [英] How to maximize a window in background?

查看:105
本文介绍了如何最大限度地在后台窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要后台最大化窗口,无需激活意义(聚焦)它。
SetWindowPlacement功能不提供这个..
任何想法?



  WINDOWPLACEMENT WP =新WINDOWPLACEMENT( ); 
GetWindowPlacement(HWND,楼盘WP);

wp.showCmd = 3;
SetWindowPlacement(HWND,楼盘WP);


解决方案

我能找到这样做,这是最好的方法( VB对不起!);

  longForeHWnd = GetForegroundWindow 
调用的ShowWindow(longBackHWnd,SW_SHOWMAXIMIZED)
SetForegroundWindow(longForeHWnd )

这只是一个变通办法,因为后台窗口是(简述)激活等得到提升了Z顺序


I need to maximize a window in background, meaning without activating (focusing) it. SetWindowPlacement function doesn't offer this.. Any ideas?

        WINDOWPLACEMENT wp = new WINDOWPLACEMENT();
        GetWindowPlacement(hwnd, ref wp);

        wp.showCmd = 3;
        SetWindowPlacement(hwnd, ref wp);

解决方案

The best way I could find to do this was (VB sorry!);

longForeHWnd = GetForegroundWindow
Call ShowWindow(longBackHWnd, SW_SHOWMAXIMIZED)
SetForegroundWindow (longForeHWnd)

This is only a work-around because the Background Window is (briefly) activated and so gets promoted up the Z-Order

这篇关于如何最大限度地在后台窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆