开发者

C# Change Properties of another running applications window

If I have a IntPtr of a running program, is there any way to change properties about that wind开发者_StackOverflowow--- for instance properties like: FormBorderStyle, ShowInTaskbar and maybe even BackColor?

Im pretty new to C# and am really curious if such a thing is even possible.

Thanks kindly for your time and help!


No, you cannot directly manipulate the managed properties of another process' windows. However, with a little trickery you can achieve this.

What you will need to do is inject a piece of managed code into the running process this piece of injected code will then be responsible for actually manipulating the properties of the managed windows/controls in that process.

Rather than regurgitate a lot of information, take a look at this old codeproject article which achieves pretty much what it sounds like you are looking for. Keep in mind that this is only for managing the proprieties of managed windows in another .NET process and you might have issues with different versions of .NET.

http://www.codeproject.com/KB/dotnet/wfspy.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜