Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cassandra/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb6 如何使用打印方法_Vb6 - Fatal编程技术网

Vb6 如何使用打印方法

Vb6 如何使用打印方法,vb6,Vb6,我有一个名为worker.dat的文件,在该文件中,信息列表存储为变量“收入”、“晋升”、“年龄”等。 我想从文件中读取这些信息并打印在屏幕上 所以我用 Open App.Path & "worker.DAT" For Input As #1 并使用Print方法打印信息 然而,为了强调,我想打印一些较大尺寸和不同字体的信息等 所以我写了这个 Printer.FontSize = 16 Printer.Print "Income = "; Income 然而,这并没有起作用。有

我有一个名为
worker.dat
的文件,在该文件中,信息列表存储为变量“收入”、“晋升”、“年龄”等。 我想从文件中读取这些信息并打印在屏幕上

所以我用

Open App.Path & "worker.DAT" For Input As #1
并使用
Print
方法打印信息

然而,为了强调,我想打印一些较大尺寸和不同字体的信息等

所以我写了这个

Printer.FontSize = 16  
Printer.Print "Income = "; Income 

然而,这并没有起作用。有人知道如何解决此问题吗?

设置字体对象的大小:

Dim pt As Long

With Printer.Font
    pt = .Size

    Printer.Print "default text"

    .Size = 16
    Printer.Print "larger text"

    .Size = pt
    .Bold = True
    Printer.Print "bold ";
    .Bold = False
    Printer.Print "in default size"

    Printer.EndDoc
End With

您是否将字体设置为可缩放字体,如Arial?打印到屏幕或表单?你都提到了。