WinForm lock other application inside form

╄→гoц情女王★ 提交于 2019-12-02 18:12:01

问题


Sorry if this was asked before or if this is stupid.
I am making an application for security staff (night guards) to make his nights more interesting, Ill love to try embed TV Player inside WinForm. Problem is that TV tuner which I have has their own application and I can only reproduce TV Signal using that application. I think If I embed that application inside my application (WinForm) then users is going also to pay more attention at other controls on my application which spouse they watch. I want to make something like it does embed IE in applications, Is this possible ?


回答1:


It is explicitly forbidden by the SDK docs, but some appcompat hacks for Windows 3.x apps can make it possible. Ab/used by several 32-bit programs as well, Acrobat Reader for one.

P/Invoke SetParent(), you'll need the window handle of the app's main window. Process.MainWindowHandle() with some luck. MoveWindow to put it in the right place. Use pinvoke.net for the declarations you'll need. The fact that this app displays video doesn't improve the odds that this will work out.



来源:https://stackoverflow.com/questions/3950515/winform-lock-other-application-inside-form

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!