Visual Studio 2010中的HWND [英] HWnd of Visual Studio 2010
本文介绍了Visual Studio 2010中的HWND的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法从VSIX扩展获得HWND指针的Visual Studio 2010的顶部的窗口? (我想改变窗口的标题)。
Is there a way to get the HWnd pointer to the top window of Visual Studio 2010 from a VSIX extension? (I would like to change the title of the window).
推荐答案
由于有很好的机会,你的VSIX扩展将运行在过程中与Visual Studio,你应该试试这个:
Since there are good chances that your VSIX extension will be running in-process with Visual Studio, you should try this:
System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle
(请注意,如果你这样做的太早,你会得到VS闪屏......)
(Note if you do this too early, you'll get VS Splash screen ...)
这篇关于Visual Studio 2010中的HWND的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文