We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

pdfviewcontrol stealing focus

Hi
Is it possible to stop the WinForms pdfViewerControl stealing focus when it loads a PDF?
Thanks

2 Replies

SS Sathish Sivakumar Syncfusion Team March 6, 2019 10:20 AM UTC

Hi Leigh, 
 
Greetings from Syncfusion. 
 
To remove PdfViewerControl from gaining focus when loading the PDF document, we need to set the ActiveControl property of the Form to null in DocumentLoaded event available in the PdfViewerControl. Please find the code snippet below for your reference. 
 
private void PdfViewerControl1_DocumentLoaded(object sender, EventArgs args) 
{ 
this.ActiveControl = null; 
} 
 
Regards,
Sathish
 



LA Leigh Anderson March 6, 2019 10:41 AM UTC

Thank you Sathish - that is exactly what I needed.


Loader.
Live Chat Icon For mobile
Up arrow icon