PrintForm.DocumentName 屬性
取得或設定列印文件時要顯示的文件名稱 (例如,在列印狀態對話框或列印佇列中)。
命名空間: Microsoft.VisualBasic.PowerPacks.Printing
組件: Microsoft.VisualBasic.PowerPacks.Vs (在 Microsoft.VisualBasic.PowerPacks.Vs.dll 中)
語法
'宣告
<BrowsableAttribute(True)> _
Public Property DocumentName As String
[BrowsableAttribute(true)]
public string DocumentName { get; set; }
[BrowsableAttribute(true)]
public:
property String^ DocumentName {
String^ get ();
void set (String^ value);
}
[<BrowsableAttribute(true)>]
member DocumentName : string with get, set
function get DocumentName () : String
function set DocumentName (value : String)
屬性值
型別:System.String
A String列印文件時要顯示。預設值是「文件」。
備註
DocumentName 不會指定要列印的檔案。 相反地,您指定列印點撥打輸出Print方法。
範例
下列範例會示範如何使用DocumentName屬性來顯示在列印時的文件名稱。 這個範例要求您必須PrintForm的表單上命名為 PrintForm1 的元件。
' Print to a printer.
PrintForm1.PrintAction = Printing.PrintAction.PrintToPrinter
' Assign a document name.
PrintForm1.DocumentName = "Quarterly Results Graph"
' Send to the printer.
PrintForm1.Print()
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。
請參閱
參考
Microsoft.VisualBasic.PowerPacks.Printing 命名空間
其他資源
HOW TO:使用 PrintForm 元件列印表單 (Visual Basic)
HOW TO:列印表單的工作區 (Visual Basic)
HOW TO:列印表單的工作區和非工作區 (Visual Basic)