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

📄 form2.frm

📁 懒人手写体模拟生成器 (免费软件) 此软件是为应付某些不能用电脑打印的文体(如思想汇报
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form_Setup 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Form1"
   ClientHeight    =   5280
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   7395
   BeginProperty Font 
      Name            =   "MS Sans Serif"
      Size            =   12
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "Form2.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   352
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   493
   StartUpPosition =   3  'Windows Default
   Begin VB.FileListBox File_Page 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   480
      Left            =   120
      TabIndex        =   20
      Top             =   3600
      Visible         =   0   'False
      Width           =   2415
   End
   Begin VB.CommandButton Command_Del 
      Caption         =   "删除"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1800
      TabIndex        =   19
      Top             =   600
      Width           =   1695
   End
   Begin VB.VScrollBar VScroll_Fix 
      Height          =   495
      Left            =   2400
      Max             =   -5
      Min             =   5
      TabIndex        =   17
      Top             =   3480
      Width           =   255
   End
   Begin VB.TextBox Txt_B 
      Appearance      =   0  'Flat
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1560
      TabIndex        =   15
      Text            =   "17"
      Top             =   2160
      Width           =   1215
   End
   Begin VB.CommandButton Command_Add 
      Caption         =   "保存"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   120
      TabIndex        =   13
      Top             =   600
      Width           =   1695
   End
   Begin VB.ComboBox Combo_Page 
      Height          =   420
      ItemData        =   "Form2.frx":1CCA
      Left            =   120
      List            =   "Form2.frx":1CCC
      TabIndex        =   12
      Text            =   "广医信纸"
      Top             =   120
      Width           =   3375
   End
   Begin VB.CommandButton Command_Start 
      Caption         =   "完成"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   120
      TabIndex        =   11
      Top             =   4680
      Width           =   3375
   End
   Begin VB.CommandButton Command_Preview 
      Caption         =   "预览刷新"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   120
      TabIndex        =   10
      Top             =   4320
      Width           =   3375
   End
   Begin VB.TextBox Txt_L 
      Appearance      =   0  'Flat
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2160
      TabIndex        =   9
      Text            =   "17"
      Top             =   2760
      Width           =   615
   End
   Begin VB.TextBox Txt_LC 
      Appearance      =   0  'Flat
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   480
      TabIndex        =   6
      Text            =   "20"
      Top             =   2760
      Width           =   375
   End
   Begin VB.TextBox Txt_H 
      Appearance      =   0  'Flat
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1200
      TabIndex        =   5
      Text            =   "264"
      Top             =   1200
      Width           =   615
   End
   Begin VB.TextBox Txt_W 
      Appearance      =   0  'Flat
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2160
      TabIndex        =   2
      Text            =   "190"
      Top             =   1200
      Width           =   615
   End
   Begin VB.TextBox Txt_T 
      Appearance      =   0  'Flat
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1560
      TabIndex        =   1
      Text            =   "54"
      Top             =   1680
      Width           =   1215
   End
   Begin VB.PictureBox Picture_Preview 
      Appearance      =   0  'Flat
      AutoRedraw      =   -1  'True
      BackColor       =   &H80000005&
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000008&
      Height          =   5100
      Left            =   3600
      ScaleHeight     =   338
      ScaleMode       =   0  'User
      ScaleWidth      =   251.012
      TabIndex        =   0
      Top             =   120
      Width           =   3750
   End
   Begin VB.Label Label_Fix 
      Alignment       =   1  'Right Justify
      Caption         =   "0"
      Height          =   375
      Left            =   2520
      TabIndex        =   18
      Top             =   3360
      Width           =   375
   End
   Begin VB.Label Label7 
      Caption         =   "末行距页底                          毫米"
      Height          =   495
      Left            =   120
      TabIndex        =   14
      Top             =   2160
      Width           =   3255
   End
   Begin VB.Label Label5 
      Caption         =   "两边距              毫米"
      Height          =   495
      Left            =   1320
      TabIndex        =   8
      Top             =   2760
      Width           =   2175
   End
   Begin VB.Line Line_Fix 
      X1              =   8
      X2              =   160
      Y1              =   248
      Y2              =   248
   End
   Begin VB.Label Label4 
      Caption         =   "共          行"
      Height          =   495
      Left            =   120
      TabIndex        =   7
      Top             =   2760
      Width           =   1215
   End
   Begin VB.Label Label3 
      Caption         =   "页面大小              X             毫米"
      Height          =   495
      Index           =   0
      Left            =   120
      TabIndex        =   4
      Top             =   1200
      Width           =   3375
   End
   Begin VB.Label Label1 
      Caption         =   "首行距页顶                          毫米"
      Height          =   375
      Left            =   120
      TabIndex        =   3
      Top             =   1680
      Width           =   3375
   End
   Begin VB.Label Label2 
      Caption         =   "倾斜校正                              毫米"
      Height          =   495
      Left            =   120
      TabIndex        =   16
      Top             =   3360
      Width           =   3375
   End
End
Attribute VB_Name = "Form_Setup"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public pW As Integer
Public pH As Integer
Public pL As Integer
Public pT As Integer
Public pB As Integer
Public paW As Integer
Public paH As Double
Public plC As Integer
Public plH As Integer
Public pFix As Integer

Private Sub Combo_Page_Click()
If Combo_Page.List(Combo_Page.ListIndex) <> "" Then
Open File_Page.List(Combo_Page.ListIndex) For Input As #1
While Not EOF(1)
Input #1, tmp
If InStr(1, tmp, "/W/") <> 0 Then pW = Val(Mid(tmp, 4))
If InStr(1, tmp, "/H/") <> 0 Then pH = Val(Mid(tmp, 4))
If InStr(1, tmp, "/T/") <> 0 Then pT = Val(Mid(tmp, 4))
If InStr(1, tmp, "/L/") <> 0 Then pL = Val(Mid(tmp, 4))
If InStr(1, tmp, "/B/") <> 0 Then pB = Val(Mid(tmp, 4))
If InStr(1, tmp, "/LC/") <> 0 Then plC = Val(Mid(tmp, 5))

Wend
Close

Txt_W.Text = pW
Txt_H.Text = pH
Txt_T.Text = pT
Txt_L.Text = pL
Txt_B.Text = pB
Txt_LC.Text = plC

Command_Preview_Click
End If
End Sub

Private Sub Command_Add_Click()
FileName = Combo_Page.Text
If FileName <> "" Then
Open FileName + ".pag" For Output As #1
Print #1, "/W/ "; Val(Txt_W.Text)
Print #1, "/H/ "; Val(Txt_H.Text)
Print #1, "/T/ "; Val(Txt_T.Text)
Print #1, "/L/ "; Val(Txt_L.Text)
Print #1, "/B/ "; Val(Txt_B.Text)
Print #1, "/LC/ "; Val(Txt_LC.Text)

Close
LoadPage
End If
End Sub

Private Sub Command_Del_Click()
If Combo_Page.List(Combo_Page.ListIndex) <> "" Then
FileName = File_Page.List(Combo_Page.ListIndex)
Kill FileName
LoadPage
End If
End Sub

Private Sub Command_Preview_Click()
If Txt_H.Text / Txt_W.Text > 340 / 250 Then
Picture_Preview.Height = 340: Picture_Preview.Width = 340 * (Txt_W.Text / Txt_H.Text)
Else
Picture_Preview.Width = 250: Picture_Preview.Height = 250 * (Txt_H.Text / Txt_W.Text)
End If

h = Picture_Preview.Height: w = Picture_Preview.Width
Picture_Preview.Cls

pW = Val(Txt_W.Text)
pH = Val(Txt_H.Text)
pL = Val(Txt_L.Text)
pT = Val(Txt_T.Text)
pB = Val(Txt_B.Text)

plC = Val(Txt_LC.Text)
plH = pH - pT - pB
paH = plH / (plC - 1)
paW = pW - pL * 2

For i = 1 To plC
tmp = Val(Picture_Preview.Height) / pH
Picture_Preview.Line (tmp * pL, tmp * (pT + (i - 1) * paH))-Step(tmp * paW, 0)
'tmp = ((Val(Txt_T.Text) + (i - 1) * Val(Txt_Lh.Text) / Val(Txt_LC.Text)) / Val(Txt_H.Text)) * h
'Picture_Preview.Line ((Val(Txt_L.Text) / Val(Txt_W.Text)) * w, tmp)-Step((Val(Txt_AW.Text) / Val(Txt_W.Text)) * w, 0)
Next
End Sub

Private Sub Command_Start_Click()
Form_IO.Visible = True
Form_Setup.Visible = False
End Sub

Private Sub Form_Load()
Form_Setup.Caption = "懒人手写体模拟生成器 V1.3  (页面设定)"
Command_Preview_Click
LoadPage
Combo_Page.Text = "广医信纸"
End Sub

Private Sub VScroll_Fix_Change()
Label_Fix.Caption = VScroll_Fix.Value
Line_Fix.Y2 = Line_Fix.Y1 - VScroll_Fix.Value * 2
End Sub

Private Sub LoadPage()
Combo_Page.Clear
File_Page.Refresh
File_Page.Pattern = "*.pag"
If File_Page.ListCount > 0 Then
For i = 1 To File_Page.ListCount
Combo_Page.AddItem Left(File_Page.List(i - 1), Len(File_Page.List(i - 1)) - 4)
Next
End If
End Sub

⌨️ 快捷键说明

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