📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
BorderStyle = 1 'Fixed Single
Caption = "Manejo de la impresora"
ClientHeight = 4770
ClientLeft = 45
ClientTop = 435
ClientWidth = 7485
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 318
ScaleMode = 3 'Pixel
ScaleWidth = 499
StartUpPosition = 3 'Windows Default
Begin VB.CheckBox Check2
Caption = "Alineaci髇 horizontal"
Height = 195
Left = 2880
TabIndex = 14
Top = 450
Width = 1815
End
Begin VB.CommandButton Command5
Caption = "Info de impresora"
Height = 375
Left = 5580
TabIndex = 13
Top = 450
Width = 1725
End
Begin VB.TextBox Text3
Height = 285
Left = 4800
TabIndex = 12
Text = "4"
Top = 120
Width = 615
End
Begin VB.HScrollBar HScroll1
Height = 255
LargeChange = 10
Left = 120
TabIndex = 10
Top = 4500
Width = 6885
End
Begin VB.VScrollBar VScroll1
Height = 3135
LargeChange = 10
Left = 7020
TabIndex = 8
Top = 1350
Width = 255
End
Begin VB.PictureBox Picture3
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 3135
Left = 120
ScaleHeight = 207
ScaleMode = 3 'Pixel
ScaleWidth = 457
TabIndex = 7
Top = 1350
Width = 6885
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 3135
Left = 0
ScaleHeight = 207
ScaleMode = 3 'Pixel
ScaleWidth = 455
TabIndex = 9
Top = 0
Width = 6855
End
End
Begin VB.TextBox Text1
Height = 285
Left = 90
TabIndex = 6
Text = "Text1"
Top = 990
Width = 5775
End
Begin VB.CommandButton Command1
Caption = "Insertar"
Height = 285
Left = 5940
TabIndex = 5
Top = 990
Width = 1335
End
Begin VB.CommandButton Command4
Caption = "Imprimir ejemplo"
Height = 285
Left = 5580
TabIndex = 4
Top = 120
Width = 1695
End
Begin VB.TextBox Text2
Height = 285
Left = 3480
TabIndex = 2
Text = "1"
Top = 120
Width = 615
End
Begin VB.CommandButton Command3
Caption = "Cancelar impresion"
Height = 285
Left = 1200
TabIndex = 1
Top = 120
Width = 1575
End
Begin VB.CommandButton Command2
Caption = "Imprimir"
Height = 285
Left = 120
TabIndex = 0
Top = 120
Width = 975
End
Begin VB.Label Label2
Caption = "Calidad:"
Height = 195
Left = 4200
TabIndex = 11
Top = 120
Width = 570
End
Begin VB.Label Label1
Caption = "Copias:"
Height = 195
Left = 2880
TabIndex = 3
Top = 120
Width = 525
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Check2_Click()
Printer.Orientation = Check2.Value + 1
End Sub
Private Sub Command1_Click()
Picture1.Print Text1.Text
End Sub
Private Sub Command2_Click()
Printer.Copies = Val(Text2.Text)
Printer.PrintQuality = Val(Text3.Text)
Printer.PaintPicture Picture1.Image, 1, 1
Printer.EndDoc
End Sub
Private Sub Command3_Click()
Printer.KillDoc
End Sub
Private Sub Command4_Click()
Printer.Copies = Val(Text2.Text)
Printer.PrintQuality = Val(Text3.Text)
Printer.CurrentX = 10 'Pongo un margen
Printer.CurrentY = 10 '
Printer.Print "P醙ina 1" & vbCrLf
Printer.FontBold = True
Printer.FontSize = 18
Printer.Print "Prueba"
Printer.NewPage
Printer.FontBold = False
Printer.FontSize = 14
Printer.Print "p醙ina 2"
Printer.ForeColor = vbRed
Printer.Print "Color rojo" ' si est
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -