Need to set focus on the PrintPreview results window

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

To solve the problem of focus being lost after the PrintPreview window has finished painting, I've put a me.focus on the PrintDocument1_EndPrint logic, as well at the end of the PrintDocument1_PrintPage logic

I'm thinking that the Me object (relating to the calling windows form) is not the correct object to set focus to, but I don't know what would be the correct object to set focus to

Thanks
 
I've found the answer as follows

Immediately after the ShowDialog method, do the focus on the PrintPreviewDialogBox control. This directly addresses the given problem

PrintPreviewDialogBox1.ShowDialog(
PrintPreviewDialogBox1.Focus(

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top