Center PrintPreviewDialog in VB.Net

Hello Experts,

I would like to know how I could center a PrintPreviewDialog on a screen. I already tried to do it with SetDesktopLocation but it did not work. Any ideas how to solve this?

Thank you in advance,
Zoidi
LVL 1
zoidiAsked:
Who is Participating?
 
RimvisConnect With a Mentor Commented:
Like this?
        PrintPreviewDialog1.StartPosition = FormStartPosition.CenterScreen
        PrintPreviewDialog1.ShowDialog()

Open in new window

0
 
zoidiAuthor Commented:
Thank you for your help. Don't know why I did not try this. Anyway, thank you :)
0
All Courses

From novice to tech pro — start learning today.