2012-07-16 17 views
1

,我想要的效果是:如何在窗口周圍繪製矩形? (當我知道它的手柄)

enter image description here

是啊..它在間諜類似的效果.. 它完美,當我在控制這樣的WindowForm內 或沒有邊框樣式的WindowForm。

然而,當涉及到一個窗體FormBorder, 它失敗!形式內的矩形形式:

enter image description here

用於繪製矩形,我從CodeProject使用的源。

+0

這裏可能會有一些幫助:http://stackoverflow.com/questions/5634743/non-client-painting-on-aero-glass-window – 2012-07-16 23:59:42

+0

可能的重複[如何確定實際的窗體窗體大小(與所有非客戶端元素)運行Aero?](http://stackoverflow.com/questions/8838621/how-to-determine-actual-windows-form-size-with-all-non- client-elements-when-run) – 2012-07-17 02:18:19

+0

我發現在窗口句柄 上繪製窗體邊界非常困難,所以我只是選擇在桌面上繪製圖形! 我只是使用GetDestktopWindow()API。 感謝大家的評論! – mik4n 2012-07-17 03:42:27

回答

0

正如前面的評論中提到的,您可以使用GetDesktopWindow()API在桌面上繪圖。

相關問題