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

📄 frmyemian.frm

📁 本系统是给大庆油田做的一个示例程序
💻 FRM
字号:
VERSION 5.00
Object = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0"; "THREED32.OCX"
Begin VB.Form FrmYeMian 
   AutoRedraw      =   -1  'True
   Caption         =   "打印页面边距设定"
   ClientHeight    =   1800
   ClientLeft      =   3870
   ClientTop       =   3030
   ClientWidth     =   4545
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1800
   ScaleWidth      =   4545
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox yemian_Txt 
      BackColor       =   &H00E0E0E0&
      Height          =   285
      IMEMode         =   3  'DISABLE
      Index           =   1
      Left            =   2850
      MaxLength       =   15
      TabIndex        =   3
      Top             =   735
      Width           =   1080
   End
   Begin VB.TextBox yemian_Txt 
      BackColor       =   &H00E0E0E0&
      Height          =   285
      IMEMode         =   3  'DISABLE
      Index           =   0
      Left            =   2865
      MaxLength       =   15
      TabIndex        =   0
      Top             =   300
      Width           =   1080
   End
   Begin Threed.SSCommand fjhv 
      Height          =   375
      Left            =   690
      TabIndex        =   5
      Top             =   1290
      Width           =   1125
      _Version        =   65536
      _ExtentX        =   1984
      _ExtentY        =   661
      _StockProps     =   78
      Caption         =   "确 定"
      ForeColor       =   16711680
   End
   Begin Threed.SSCommand SSCExit 
      Height          =   375
      Left            =   2610
      TabIndex        =   6
      Top             =   1305
      Width           =   1125
      _Version        =   65536
      _ExtentX        =   1984
      _ExtentY        =   661
      _StockProps     =   78
      Caption         =   "取 消"
      ForeColor       =   16711680
   End
   Begin VB.Label yemian_Lb 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C000C0&
      Height          =   210
      Index           =   3
      Left            =   4080
      TabIndex        =   4
      Top             =   300
      Width           =   105
   End
   Begin VB.Label yemian_Lb 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "顶边距(占纸长的百分数):"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C000C0&
      Height          =   210
      Index           =   1
      Left            =   390
      TabIndex        =   2
      Top             =   795
      Width           =   2520
   End
   Begin VB.Label yemian_Lb 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "左边距(占纸宽的百分数):"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C000C0&
      Height          =   210
      Index           =   0
      Left            =   360
      TabIndex        =   1
      Top             =   345
      Width           =   2520
   End
End
Attribute VB_Name = "FrmYeMian"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub fjhv_Click()
  If yemian_Txt(0).Text > 0.5 Or yemian_Txt(0).Text > 0.5 Then
    MsgBox "注意,边距设置范围必须小于0.5,请重新设置边距!", vbInformation, "提醒!"
    Exit Sub
  End If
  Print_XLeftPercent = yemian_Txt(0).Text
  Print_YTopPercent = yemian_Txt(1).Text
  PrintSet False, Print_XLeftPercent, Print_YTopPercent, Print_Director
   Unload Me
End Sub

Private Sub Form_Load()
  PrintSet True, Print_XLeftPercent, Print_YTopPercent, Print_Director
  yemian_Txt(0).Text = Format(Print_XLeftPercent, "#0.#######")
  yemian_Txt(1).Text = Format(Print_YTopPercent, "#0.#######")
End Sub

Private Sub SSCExit_Click()
  Unload Me
End Sub

Private Sub yemian_Txt_KeyPress(Index As Integer, KeyAscii As Integer)
  If KeyAscii = 8 Or KeyAscii = 46 Or ((KeyAscii >= 48) And (KeyAscii <= 57)) Then
   
  Else
   KeyAscii = 0
  End If
End Sub

⌨️ 快捷键说明

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