⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmdisplayimage.frm

📁 通用样品管理系统是一个商业程序,功能界面都还不错!
💻 FRM
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
Begin VB.Form frmDisplayImage 
   AutoRedraw      =   -1  'True
   BorderStyle     =   3  'Fixed Dialog
   ClientHeight    =   6750
   ClientLeft      =   45
   ClientTop       =   45
   ClientWidth     =   5400
   ClipControls    =   0   'False
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   6750
   ScaleWidth      =   5400
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton Command2 
      Caption         =   "打印(&P)"
      Height          =   405
      Left            =   2925
      TabIndex        =   2
      Top             =   5910
      Width           =   1185
   End
   Begin VB.CommandButton Command1 
      Cancel          =   -1  'True
      Caption         =   "关闭(&X)"
      Default         =   -1  'True
      Height          =   405
      Left            =   4125
      TabIndex        =   1
      Top             =   5910
      Width           =   1185
   End
   Begin VB.Frame Frame1 
      Height          =   825
      Left            =   60
      TabIndex        =   0
      Top             =   5805
      Width           =   2595
      Begin VB.CheckBox Check2 
         Caption         =   "自动大小"
         Height          =   180
         Left            =   195
         TabIndex        =   4
         Top             =   225
         Width           =   1290
      End
      Begin MSComDlg.CommonDialog PrintDialog 
         Left            =   1500
         Top             =   570
         _ExtentX        =   847
         _ExtentY        =   847
         _Version        =   327681
         CancelError     =   -1  'True
      End
      Begin VB.CheckBox Check1 
         Caption         =   "打印图片+样品描述内容"
         Height          =   255
         Left            =   195
         TabIndex        =   3
         Top             =   480
         Width           =   2265
      End
   End
   Begin VB.Image DisplayImage 
      BorderStyle     =   1  'Fixed Single
      Height          =   5700
      Left            =   75
      Stretch         =   -1  'True
      ToolTipText     =   "样品图片显示处"
      Top             =   75
      Width           =   5250
   End
End
Attribute VB_Name = "frmDisplayImage"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Check1_Click()
 SaveSetting App.EXEName, "Print Photo", "PhotoAndDescript", Check1.Value
End Sub

Private Sub Check2_Click()
If Check2.Value = 1 Then
   DisplayImage.Stretch = False
   DisplayImage.Refresh
    Else
   DisplayImage.Height = 5700
   DisplayImage.Width = 5265
   DisplayImage.Stretch = True
   DisplayImage.Refresh
End If
End Sub

Private Sub Command1_Click()
 Unload Me
End Sub

Private Sub Command2_Click()
 Me.MousePointer = 11
 PrintDialog.CancelError = True
 On Error Resume Next
 PrintDialog.ShowPrinter
 If Err.Number = 32755 Then
    Me.MousePointer = 0
    Exit Sub
 End If
 '打印图片
 If Check1.Value = 1 Then
 Printer.PrintQuality = -4
 Printer.PaintPicture DisplayImage.Picture, 1500, 800
 Printer.Font = "黑体"
 Printer.FontBold = True
 Printer.FontSize = 20
 Printer.CurrentX = 500
 Printer.CurrentY = 6500
 Printer.Print ""
 Printer.Print ""
 Printer.Print ""
 Printer.Print ""
 Printer.Print ""
 Printer.Print ""
 Printer.Print "  样品信息如下:________________________________________________________"
 Printer.Print ""
 Printer.Print ""

 Printer.Print "        " & Pro(0) & ": " + Des(0); ""
 Printer.Print "        " & Pro(2) & ": " + Des(2); ""
 Printer.Print "        " & Pro(3) & ": " + Des(3); ""
 Printer.Print "        " & Pro(4) & ": " + Des(4)
 Printer.Print "        " & Pro(5) & ": " + Des(5)
 Printer.Print "        " & Pro(6) & ": " + Des(6)
 Printer.Print "        " & Pro(7) & ": " + Des(7)
 Printer.Print "        " & Pro(8) & ": " + Des(8)
 Printer.Print ""
 Printer.Print ""
 Printer.Font = "隶书"
 Printer.FontBold = False
 Printer.FontSize = 14
 Printer.Print "  <<<<<<<<<<<<<<<<<<<<<<<<<< " & CompanyName; "制单 " & Year(Date) & "年" & Month(Date) & "月" & Day(Date) & "日" & " " & Time()
 Else
 Printer.PrintQuality = -4
 Printer.Print ""
 Printer.Print ""
 Printer.Print ""
 Printer.FontSize = 20
 Printer.Print "           __________" & Pro(0) & ": " & Des(0) & "__________"
 Printer.PaintPicture DisplayImage.Picture, 1800, 2800
 End If
 Printer.EndDoc
 
 Me.MousePointer = 0
End Sub

Private Sub Form_Load()
frmDisplayImage.Left = (MDIForm1.Width - frmDisplayImage.Left) / 2
frmDisplayImage.Top = 50
 Check1.Value = GetSetting(App.EXEName, "Print Photo", "PhotoAndDescript", 0)
End Sub

Private Sub Form_Unload(Cancel As Integer)
 frmExplorer.Show
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -