Vb中获取打印对话框

Vb中获取打印对话框

本文介绍了如何在Wpf Vb中获取打印对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网站上看了

I looked on the site

http://msdn.microsoft.com/en-us/library/aa970848(v=vs.110).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1
http://msdn.microsoft.com/en-us/library/aa969772(v=vs.110).aspx
http://msdn.microsoft.com/en-us/library/system.windows.xps.xpsdocumentwriter(v=vs.110).aspx
http://www.codeproject.com/Articles/33076/WPF-Printing-Basic-Text-Printing
http://www.dotnetheaven.com/article/printing-in-wpf-using-vb.net

我想打印一个文本框,可以选择它去哪个打印机,也许它也可以打印图像。



微软MSDN不是很好,它没有说要包括什么,它强迫因为IDK Visual Studio无法识别XPS文档而无法使用XPS。



以下代码不起作用:

I want to print a text box, with a choice of which printer it goes to, and maybe it could also print images too.

Microsoft MSDN is not great it doesn't say what to include, and it forces the use of XPS which doesn't work because IDK Visual studio doesn't recognise XPS Documents.

Heres some code that doesn't work:

Dim xpsDocument As New XpsDocument("C:\FixedDocumentSequence.xps", FileAccess.ReadWrite)

我甚至无法访问学校的C:\以便它运行它不会工作,但它不会运行,因为XpsDocument的问题,这是什么,我试图包括

Imports System.Windows.XPS 但这不起作用,这是有史以来最糟糕的语言。为什么没有人设法在VB上用WPF中的对话框打印?

I don't even have access to the C:\ at school so that if it ran it wouldn' work but it won't run because of the issues with XpsDocument, what is that and I tried to include
Imports System.Windows.XPS but that didn't work, this is the worst Language ever. Why has no one managed to print with a dialogue box in WPF on VB before?

推荐答案


这篇关于如何在Wpf Vb中获取打印对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-30 08:13