windowsformshost

Display PDF Takes Focus and Eats Hot Key

巧了我就是萌 提交于 2019-12-12 02:48:23
问题 Used code I found on SO to use the COM based Acrobat Reader to display PDF via hosting in a WindowsFormsHost. It displays the PDF fine. Two problems: When I load the PDF the control AxAcroPDFLib.AxAcroPDF takes focus I want focus to remain on the prior When AxAcroPDFLib.AxAcroPDF has focus it eats the Hot Key (N) The ALT key does not even underline the N. Even if the user selects the AxAcroPDFLib.AxAcroPDF I would like the Hot Keys to work. I understand this is COM and Adobe in WPF and there

Difference in using WindowsFormsHost over WebBrowser to view PDF files?

≯℡__Kan透↙ 提交于 2019-12-11 05:48:15
问题 I'm creating an application that will heavily use PDF file viewing. Is there a difference/advantage in using WindowsFormsHost over WebBrowser? WebBrowser is just a line of code versus WindowsFormsHost setup. So, I'm curious if there are any advantages of using WindowsFormsHost? 回答1: WPF WebBrowser control runs in IE protected mode by default, and Adobe PDF Reader plugin is known to have issues with that. Check this question. I'd go with WindowsFormsHost and host PDF Reader ActiveX directly,

Controls don't show over Winforms Host

你。 提交于 2019-12-11 03:56:28
问题 I am trying to load a swf file as background for my WPF window. For this I have used a WinformHost and I load the swf movie in the Winform host using the plugin AxShockwaveFlashObjects. <Grid> <WindowsFormsHost Name="wfh"> <ax:AxShockwaveFlash x:Name="axFlash"/> </WindowsFormsHost> </Grid> Till here the application works fine. However when I add my other controls(buttons,textblocks etc) to the Grid, they dont show. All I see is just the movie. Any pointers please. 回答1: This is actually

WPF: When is a TabItem actually loaded, rendered and completly ready?

筅森魡賤 提交于 2019-12-11 03:33:30
问题 In my WPF application, I have a class that serves as a wrapper around QuickTime. It provides all the specific or simplified functionality I need. To function, it needs to create an instance of QuickTime's ActiveX control and place it in a valid Windows Forms window. My app being WPF, the constructor works like this: public VideoPlayerQT(WindowsFormsHost wfHost) { AxQTControl qtControl = new AxQTControl(); wfHost.Child = qtControl; } Now in the main window, I use the player like this: private

Viewbox makes WindowsFormsHost disappear in WPF

久未见 提交于 2019-12-10 21:44:52
问题 I have a WPF project where I maintain video ratio, by placing video control inside a ViewBox. The video control is a WinForms object wrapped inside a WindowsFormsHost. I also added a gridSplitter to resize the ViewBox. It all worked great, until I noticed a strange bug. When I would use the gridSplitter control to minimize the ViewBox close to zero, the video ratio would get screwed up after expanding it again. And when I used gridSplitter to contract the ViewBox all the way down to 0, the

wpf WindowsFormsHost is not visible when AllowsTransparency=“True”

孤者浪人 提交于 2019-12-10 21:07:59
问题 somebody addressed this issue here http://social.msdn.microsoft.com/forums/en-US/wpf/thread/6f9dd3b5-af92-4076-9b4e-1a770dd52f70/ but that was in 2006. i am currently using .net framework 3.5. Is there any better solution for that now. Does anybody know if microsoft has a straight forward solution for this issue in 4.0? 回答1: Yes, this won't work. Quote from this link This is a limitation of using WS_EX_LAYERED and UpdateLayeredWindow(). This form of layered windows does not support child

Continuing execution in WPF app after an exception in a hosted Winforms control

℡╲_俬逩灬. 提交于 2019-12-10 17:27:53
问题 I have a WPF app that has a WindowsFormsHost in which a 3rd party WinForms control is hosted. Sometimes, because of a bug in the 3rd party WinForms control I get a NullReferenceException . Although I had set up a DispatcherUnhandledException handler I can't catch the exception there and continue the execution. Only in the AppDomain.CurrentDomain.UnhandledException handler I can "catch" it but I cannot do much from then on, the application simply exits. Then I found a stackoverflow question

WPF GridSplitter visiblity

廉价感情. 提交于 2019-12-10 11:54:37
问题 I have a problem regarding GridSplitter visiblity. In this, whatever I am hosting a Winform DataGridView. The GridSplitter, when dragged is properly visible on other controls. But not on this grid. In fact, whatever I host instead of Datagridview, becomes the topmost control, which makes the GridSplitter hide behind it. <Grid> <Grid.RowDefinitions> <RowDefinition Name="rowForButton"/> <RowDefinition Name="rowForGridSplitter" Height="Auto" MinHeight="81" /> </Grid.RowDefinitions> <Button Grid

WindowsFormsHost Winform pdfviewer control problem

老子叫甜甜 提交于 2019-12-08 13:23:52
问题 I have a wpf Usercontrol, inside i am using a Winforms pdfviewer to display pdf files. Also i have couple of Textboxes to enter document details. finally, A popup which display this user control. The problem is, when i try to type something in textboxes, ntn is happenning. when i right click on a textbox, i can see context menu with cut, copy and paste options. After googling little bit, i found something like below, Forms.Integration.WindowsFormsHost.EnableWindowsFormsInterop(), I placed

Animating WindowsFormsHost

安稳与你 提交于 2019-12-08 09:50:35
问题 I need to animate WindowsFormsHost control. The problem is that I can't see the animation, the window doesn't refresh. If I resize my WPF window during the animation then the transition is visible. I tried putting WindowsFormsHost inside a grid and then animate the grid but the result is the same. I put some other stuff into the grid to make sure that I wrote the animation correctly. Here's some simple application just to test this: <Window x:Class="WpfApplication1.MainWindow" xmlns="http:/