📄 direct.bas
字号:
Sub Command1_Click () ' "PRINT DIRECTLY" BUTTON
' Uses Visual BASIC commands to plot circles and
' lines directly on the printer.
Screen.MousePointer = 11 ' HOURGLASS CURSOR
printer.ScaleMode = 5 ' SCALE IN INCHES
Picture1.Cls
Picture1.Print "Plotting on printer..."
printer.DrawWidth = 3 ' DRAW CIRCLES
printer.Circle (2, 2), 1.5
printer.DrawWidth = 1
printer.Circle (2, 2), 1.45
printer.DrawWidth = 1 ' DRAW LISSAJOUS FIGURE
Pi# = 3.1415926537
x = 2
y = 2 + 1
printer.PSet (x, y)
For t# = 0 To Pi# * 32.1 Step Pi# / 64
x = 2 + Sin(t#)
y = 2 + Cos(t# * 1.0625)
printer.Line -(x, y)
s% = DoEvents()
Next t#
m$ = "PC Techniques" ' PRINT LABEL
printer.CurrentY = 3.05
printer.CurrentX = 2 - printer.TextWidth(m$) / 2
printer.Print m$
Picture1.Print "Spooling output..."
printer.EndDoc ' CLOSE PRINTER
Picture1.Print "Finished"
Screen.MousePointer = 0 ' NORMAL CURSOR
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -