当前位置: 动力学知识库 > 问答 > 编程问答 >

printing - VB.Net Print Preview Icon Change

问题描述:

I am back again with another question that I could not find answer to in the search engines;

I am trying to change the Print Preview Icon to be same as the Main form (Form1) icon;

I tried the following without success;

I appreciate the help.

 PrintPreviewDialog1.ShowIcon = My.Resources.Icon

PrintPreviewDialog1.Icon = Me.Icon

PrintPreviewDialog1.Icon = Form1.Icon

网友答案:

Not sure what problems or errors that you are getting. Creating a small test application where I am dynamically creating the PrintPreviewDialog and assigning the Form's Icon to it before showing it works for me.

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Dim printPreviewDialog1 As New PrintPreviewDialog
    printPreviewDialog1.Icon = Icon
    printPreviewDialog1.ShowDialog()
End Sub
分享给朋友:
您可能感兴趣的文章:
随机阅读: