久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

      1. <i id='TVLMi'><tr id='TVLMi'><dt id='TVLMi'><q id='TVLMi'><span id='TVLMi'><b id='TVLMi'><form id='TVLMi'><ins id='TVLMi'></ins><ul id='TVLMi'></ul><sub id='TVLMi'></sub></form><legend id='TVLMi'></legend><bdo id='TVLMi'><pre id='TVLMi'><center id='TVLMi'></center></pre></bdo></b><th id='TVLMi'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='TVLMi'><tfoot id='TVLMi'></tfoot><dl id='TVLMi'><fieldset id='TVLMi'></fieldset></dl></div>

        <legend id='TVLMi'><style id='TVLMi'><dir id='TVLMi'><q id='TVLMi'></q></dir></style></legend>
          <bdo id='TVLMi'></bdo><ul id='TVLMi'></ul>
        <tfoot id='TVLMi'></tfoot>

        <small id='TVLMi'></small><noframes id='TVLMi'>

      2. Windows 7:無(wú)論其他窗口有焦點(diǎn),如何將窗口置于最

        Windows 7: how to bring a window to the front no matter what other window has focus?(Windows 7:無(wú)論其他窗口有焦點(diǎn),如何將窗口置于最前面?)

          1. <legend id='fBO7P'><style id='fBO7P'><dir id='fBO7P'><q id='fBO7P'></q></dir></style></legend>
              <tbody id='fBO7P'></tbody>
          2. <tfoot id='fBO7P'></tfoot>
              <bdo id='fBO7P'></bdo><ul id='fBO7P'></ul>

                <i id='fBO7P'><tr id='fBO7P'><dt id='fBO7P'><q id='fBO7P'><span id='fBO7P'><b id='fBO7P'><form id='fBO7P'><ins id='fBO7P'></ins><ul id='fBO7P'></ul><sub id='fBO7P'></sub></form><legend id='fBO7P'></legend><bdo id='fBO7P'><pre id='fBO7P'><center id='fBO7P'></center></pre></bdo></b><th id='fBO7P'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='fBO7P'><tfoot id='fBO7P'></tfoot><dl id='fBO7P'><fieldset id='fBO7P'></fieldset></dl></div>
              • <small id='fBO7P'></small><noframes id='fBO7P'>

                1. 本文介紹了Windows 7:無(wú)論其他窗口有焦點(diǎn),如何將窗口置于最前面?的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  我正在實(shí)現(xiàn)一個(gè)任務(wù)欄替換、類(lèi)似停靠欄的應(yīng)用程序切換器風(fēng)格的程序.它使用 OpenGL 和鍵盤(pán)快捷鍵做了一些獨(dú)特的事情,所以它的設(shè)置方式,窗口并不總是有焦點(diǎn).我想實(shí)現(xiàn)它,以便我可以將任意窗口帶到前臺(tái),就像任務(wù)欄或 ALT-TAB 程序一樣.

                  I'm implementing a task-bar replacement, dock-like application-switcher style program. It's doing some unique stuff with OpenGL, and with keyboard shortcuts, so the way it's set up, the window doesn't always have focus. I'd like to implement it such that I can bring an arbitrary window to the foreground, much like a taskbar or an ALT-TAB program would.

                  但是,我的代碼只是使應(yīng)用程序圖標(biāo)在任務(wù)欄中閃爍.Windows API 文檔說(shuō)這是應(yīng)該發(fā)生的事情,但我正在尋找一種方法來(lái)解決這個(gè)問(wèn)題.

                  However, my code simply causes the application icon to flash in the taskbar. The Windows API documentation says that this is what is supposed to happen, but I'm looking for a way to work around this.

                  我從以下示例中改編了我的代碼,其中說(shuō)明附加到前臺(tái)線程應(yīng)該允許您設(shè)置前臺(tái)窗口.以下是網(wǎng)站:

                  I've adapted my code from the following examples, which say that attaching to the foreground thread should allow you to set the foreground window. Here are the sites:

                  http://www.voidnish.com/Articles/ShowArticle.aspx?code=dlgboxtricks

                  http://invers2008.blogspot.com/2008/10/mfc-how-to-steal-focus-on-2kxp.html

                  我的代碼看起來(lái)像這樣.請(qǐng)注意,它使用的是 python 的 win32 包裝器(self.hwnd 是我想放在前面的窗口的句柄):

                  My code looks like this. Note that it's using the win32 wrappers for python (self.hwnd is the handle of the window I want to bring to the front):

                  fgwin = win32gui.GetForegroundWindow()
                  fg = win32process.GetWindowThreadProcessId(fgwin)[0]
                  current = win32api.GetCurrentThreadId()
                  if current != fg:
                      win32process.AttachThreadInput(fg, current, True)
                      win32gui.SetForegroundWindow(self.hwnd)
                      win32process.AttachThreadInput(fg, win32api.GetCurrentThreadId(), False)
                  

                  然而,除非我的窗口是前臺(tái)窗口(通常不是),否則這只會(huì)導(dǎo)致程序的圖標(biāo)閃爍.

                  However, unless my window is the foreground window (which it isn't usually), this just causes the program's icon to flash.

                  我是不是把線貼錯(cuò)了?有沒(méi)有另一種方法可以解決這個(gè)問(wèn)題?我想一定有,因?yàn)橛泻芏鄳?yīng)用程序切換器似乎能夠很好地做到這一點(diǎn).

                  Am I doing the thread attaching wrong? Is there another way to work around this? I figure there must be, as there are lots of application switchers out there that seem to be able to do this just fine.

                  我是用 python 寫(xiě)的,但如果有其他語(yǔ)言的解決方案,我將使用包裝器或做任何必要的事情來(lái)啟動(dòng)和運(yùn)行.

                  I'm writing this in python, but if there is a solution in another language I will use wrappers or do whatever is necessarry to get this up and running.

                  提前致謝!

                  我愿意接受一種使其僅在我的特定計(jì)算機(jī)上工作的方法,即一種在我的機(jī)器上啟用任何應(yīng)用程序獲得焦點(diǎn)的方法.

                  I'd be open to a way to make it work only on my particular computer, i.e. a way to enable, on my machine, a way for any application to take focus.

                  推薦答案

                  我有一些已經(jīng)運(yùn)行多年的代碼,一直回??到 Windows 95.雙擊應(yīng)用程序系統(tǒng)托盤(pán)圖標(biāo)時(shí),我總是使用 Win32諸如BringWindowToTop 和SetForegroundWindow 之類(lèi)的API 函數(shù)將我的應(yīng)用程序窗口帶到前臺(tái).這一切在 Windows 7 上都停止了,我的輸入窗口最終會(huì)落后于其他窗口,并且窗口圖標(biāo)會(huì)在狀態(tài)欄上閃爍.我想出的解決方法"是這樣的;它似乎適用于所有版本的 Windows.

                  I've had some code that's been running for years, going all the way back to Windows 95. When double clicking the applications system tray icon I always used Win32 API functions such as BringWindowToTop and SetForegroundWindow to bring my application windows to the foreground. This all stopped working as intended on Windows 7, where my input window would end up behind other windows and the window icon would flash on the status bar. The 'work around' that I came up with was this; and it seems to work on all versions of Windows.

                  //-- show the window as you normally would, and bring window to foreground.
                  //   for example;
                  ::ShowWindow(hWnd,SW_SHOW); 
                  ::BringWindowToTop(hWnd);
                  ::SetForegroundWindow(hWnd);
                  
                  //-- on Windows 7, this workaround brings window to top
                  ::SetWindowPos(hWnd,HWND_NOTOPMOST,0,0,0,0, SWP_NOMOVE | SWP_NOSIZE);
                  ::SetWindowPos(hWnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE | SWP_NOSIZE);
                  ::SetWindowPos(hWnd,HWND_NOTOPMOST,0,0,0,0,SWP_SHOWWINDOW | SWP_NOMOVE | SWP_NOSIZE);
                  

                  這篇關(guān)于Windows 7:無(wú)論其他窗口有焦點(diǎn),如何將窗口置于最前面?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  When and how should I use exception handling?(我應(yīng)該何時(shí)以及如何使用異常處理?)
                  How to create a modal dialog in tkinter?(如何在 tkinter 中創(chuàng)建模態(tài)對(duì)話框?)
                  Test if stdin has input for C++ (windows and/or linux)(測(cè)試 stdin 是否有 C++ 輸入(windows 和/或 linux))
                  Sending Two or more chars using SendInput(使用 SendInput 發(fā)送兩個(gè)或更多字符)
                  What happens when you close a c++ console application(關(guān)閉 C++ 控制臺(tái)應(yīng)用程序時(shí)會(huì)發(fā)生什么)
                  Keyboard Input amp; the Win32 message loop(鍵盤(pán)輸入Win32 消息循環(huán))
                  <tfoot id='Z4sFJ'></tfoot><legend id='Z4sFJ'><style id='Z4sFJ'><dir id='Z4sFJ'><q id='Z4sFJ'></q></dir></style></legend>

                      • <bdo id='Z4sFJ'></bdo><ul id='Z4sFJ'></ul>

                      • <i id='Z4sFJ'><tr id='Z4sFJ'><dt id='Z4sFJ'><q id='Z4sFJ'><span id='Z4sFJ'><b id='Z4sFJ'><form id='Z4sFJ'><ins id='Z4sFJ'></ins><ul id='Z4sFJ'></ul><sub id='Z4sFJ'></sub></form><legend id='Z4sFJ'></legend><bdo id='Z4sFJ'><pre id='Z4sFJ'><center id='Z4sFJ'></center></pre></bdo></b><th id='Z4sFJ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Z4sFJ'><tfoot id='Z4sFJ'></tfoot><dl id='Z4sFJ'><fieldset id='Z4sFJ'></fieldset></dl></div>
                          • <small id='Z4sFJ'></small><noframes id='Z4sFJ'>

                              <tbody id='Z4sFJ'></tbody>
                            主站蜘蛛池模板: 欧美日韩一区二区三区不卡视频 | 国产在线www | 国产欧美久久一区二区三区 | 天天视频一区二区三区 | 2018天天干天天操 | 亚洲iv一区二区三区 | 国产伦精品一区二区三区视频金莲 | 99爱在线观看 | 久久久久久亚洲 | 亚洲综合在 | 久久久亚洲精品视频 | 中文字幕国产精品 | 日日夜夜操天天干 | 精品一区国产 | 一区在线免费视频 | 不卡在线视频 | 亚洲国产精品一区在线观看 | 视频一区二区在线观看 | 国产视频第一页 | 成人高清网站 | 91国自产 | 激情欧美一区二区三区中文字幕 | 精品免费国产一区二区三区四区介绍 | a级毛片毛片免费观看久潮喷 | 九九精品网 | 成人欧美一区二区三区视频xxx | 国产精品视频二区三区 | 国产麻豆乱码精品一区二区三区 | 第一福利社区1024 | 国产精品一区在线观看 | 一区二区三区四区在线播放 | 久久精品免费一区二区三 | 欧美一二三 | 亚洲精品一 | 一区二区亚洲 | 国产午夜精品一区二区三区嫩草 | 久久久久久成人网 | 成人午夜电影在线观看 | 久久综合狠狠综合久久综合88 | 亚洲午夜网| 亚洲视频免费一区 |