共用方式為


Printer.FontTransparent 屬性

取得或設定值,決定是否在文字字元背後列印 Printer 物件的背景圖形。

命名空間:  Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6
組件:  Microsoft.VisualBasic.PowerPacks.Vs (在 Microsoft.VisualBasic.PowerPacks.Vs.dll 中)

語法

'宣告
Public Property FontTransparent As Boolean
public bool FontTransparent { get; set; }
public:
property bool FontTransparent {
    bool get ();
    void set (bool value);
}
member FontTransparent : bool with get, set
function get FontTransparent () : boolean 
function set FontTransparent (value : boolean)

屬性值

類型:Boolean
傳回 Boolean。

備註

當 FontTransparent 屬性設為 true時,文字會列印在目前列印位置 (CurrentXCurrentY) 中的所有圖形頂端。 在色彩和相同的背景圖形可能無法讀取文字背後的圖形是否可見,以及文字。

當 FontTransparent 屬性設定為 false,文字在白色背景將列印,遮蔽圖形區域文字後面的。

注意事項注意事項

Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 命名空間中的函式和物件都是供這些工具使用,以便從 Visual Basic 6.0 升級至 Visual Basic。在大多數情況下,這些函式和物件會複製在 .NET Framework 的其他命名空間中可以找到的功能。只有當 Visual Basic 6.0 程式碼模型與 .NET Framework 實作有顯著差異時,才需要這些項目。

範例

下列範例會示範如何列印在影像的文字在頁面。 它假設,將影像資源具名 Image1 加入至專案。

Dim Printer As New Printer
Printer.PaintPicture(My.Resources.Image1, 0, 0)
' Set the print position to location of the image.
Printer.CurrentX = 0
Printer.CurrentY = 0
Printer.FontTransparent = True
Printer.Print("FontTransparent is True " & vbCrLf)
Printer.FontTransparent = False
Printer.Print("FontTransparent is False")
Printer.EndDoc()

.NET Framework 安全性

請參閱

參考

Printer 類別

Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 命名空間

其他資源

Printer Compatibility Library

How to: Fix Upgrade Errors by Using the Printer Compatibility Library (Visual Basic)

Deploying Applications That Reference the Printer Compatibility Library