Windows应用程序的打印预览/打印功能不适合我的网格 [英] Print Preview /Print function of Windows application doesn't fit my Grid
本文介绍了Windows应用程序的打印预览/打印功能不适合我的网格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好专家,
这是打印预览功能正常工作的代码
Hello experts,
Here is my code where the Print preview functionality works
Private Sub PrintPreviewToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrintPreviewToolStripMenuItem.Click, btnPreview.Click
If printTarget Is Nothing Then
MessageBox.Show("Please select a target.")
Else
Try
PrintPreviewDialog1.WindowState = FormWindowState.Maximized
PrintPreviewDialog1.ShowDialog()
Catch es As Exception
MessageBox.Show(es.Message)
End Try
End If
End Sub
由于我的网格形式很大,它只显示网格的一半。休息所有网格绝对完美。
有人可以帮我吗?
As my Grid is huge in the forms, it only shows half of the grid. Rest all the grids are absolutely perfect.
Can someone help me please?
推荐答案
PrintDocument1.DefaultPageSettings.Margins.Left = 50
PrintDocument1.DefaultPageSettings.Landscape = True
这就是我所做的......如果有人需要,简单但有用。
Just尝试将肖像更改为横向
This is what I did ... simple yet useful if someone needs.
Just try changing portrait to landscape
这篇关于Windows应用程序的打印预览/打印功能不适合我的网格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文