利用PrintForm 组件,您无需使用 PrintDocument 组件即可完全按照窗体的图像在屏幕上的显示快速打印窗体的图像。下面的过程演示如何将窗体打印到打印机、打印预览窗口和封装的 PostScript 文件。将窗体打印到默认打印机在“工具箱”中,单击“Visual Basic PowerPacks”选项卡,然后将 PrintForm 组件拖到窗体上。 PrintForm ...
在“工具箱”中,单击“Visual Basic PowerPacks”选项卡,然后将PrintForm组件拖到窗体上。 PrintForm组件将添加到组件栏中。 在“属性”窗口中,将PrintAction属性设置为PrintToPrinter。 将下面的代码添加到相应的事件处理程序(例如,“打印”Button 的 Click 事件处理程序)中。
To print the client area of a form In theToolbox, click theVisual Basic PowerPackstab and then drag thePrintFormcomponent onto the form. ThePrintFormcomponent is added to the component tray. In thePropertieswindow, set thePrintActionproperty toPrintToPrinter. ...
This step-by-step article shows you how to use Win32 spooler functions from a program that you create by using Visual Basic .NET. Back to the top More information To send raw data to a printer from the Microsoft .NET Framework, your program must work with Win32 spooler functions. Through...
分步示例在Visual Basic 中创建一个新的标准 EXE 项目。默认状态下,创建 Form1。在项目 菜单上单击 添加模块,然后添加以下代码: Option Explicit Public Declare Function lstrcpy Lib "kernel32" _ Alias "lstrcpyA" _ (ByVal lpString1 As String, _ ByVal lpString2 As String) _ As Long Public Declare ...
您可以使用 Vbprndlg.dll 文件代替 Visual BasicCommonDialog控件的打印对话框部分。此文件公开了一些属性并提供了CommonDialog控件所没有的功能。 Visual Basic 中的CommonDialog控件允许显示打印对话框,但它未不允许访问可在打印对话框中进行设置并由打印机对象使用的许多属性。由于结构(用户定义的结构类型)的对齐问题,...
While the Visual Basic 6.0 IDE is no longer supported, Microsoft's goal is that Visual Basic 6.0 applications continue to run on supported Windows versions. The resources available from this page should help you as you maintain existing applications, and as you migrate your functionality to .NET...
命名空間: Microsoft.VisualBasic.PowerPacks.Printing 組件: Microsoft.VisualBasic.PowerPacks.Vs (在 Microsoft.VisualBasic.PowerPacks.Vs.dll 中)語法C# 複製 [BrowsableAttribute(true)] public string DocumentName { get; set; } 屬性值型別:System.String A String列印文件時要顯示。預設值是「文件」。
While the Visual Basic 6.0 IDE is no longer supported, Microsoft's goal is that Visual Basic 6.0 applications continue to run on supported Windows versions. The resources available from this page should help you as you maintain existing applications, and as you migrate your functionality to .NET...
PrintForm 组件随即添加到组件栏。 在**“属性”**窗口中,将 PrintAction 属性设置为 PrintToPrinter。 将下面的代码添加到相应的事件处理程序(例如,**“打印”**按钮Button的 Click 事件处理程序)中。 复制 PrintForm1.Print() 在打印预览窗口中显示窗体在**“工具箱”中,单击“Visual Basic PowerPacks”*...