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

📄 frma.frm

📁 本人写的一个垃圾代码,主要是实现简单的打印功能
💻 FRM
📖 第 1 页 / 共 3 页
字号:
         Left            =   1920
         TabIndex        =   37
         Top             =   6480
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   873
         BackColor       =   16761024
         Caption         =   "清除窗体"
         ButtonPicture   =   "frmA.frx":1454
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         MouseIcon       =   "frmA.frx":1BCE
      End
      Begin VB.Label Label17 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "号"
         BeginProperty Font 
            Name            =   "Microsoft Sans Serif"
            Size            =   11.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   270
         Left            =   5040
         TabIndex        =   32
         Top             =   2130
         Width           =   225
      End
      Begin VB.Label Label23 
         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
         Height          =   210
         Left            =   120
         TabIndex        =   31
         Top             =   3960
         Width           =   1470
      End
      Begin VB.Label Label22 
         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
         Height          =   210
         Left            =   2520
         TabIndex        =   9
         Top             =   5880
         Width           =   840
      End
      Begin VB.Label Label21 
         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
         Height          =   210
         Left            =   2520
         TabIndex        =   8
         Top             =   5400
         Width           =   840
      End
      Begin VB.Label Label20 
         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
         Height          =   210
         Left            =   720
         TabIndex        =   7
         Top             =   4560
         Width           =   840
      End
      Begin VB.Label Label15 
         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
         Height          =   210
         Left            =   120
         TabIndex        =   6
         Top             =   3480
         Width           =   5460
      End
      Begin VB.Label Label14 
         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
         Height          =   210
         Left            =   720
         TabIndex        =   5
         Top             =   3000
         Width           =   4620
      End
      Begin VB.Label Label8 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "中华人民共和国"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   15.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         Left            =   1680
         TabIndex        =   3
         Top             =   600
         Width           =   2205
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "建设用地规划许可证"
         BeginProperty Font 
            Name            =   "黑体"
            Size            =   18
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   360
         Left            =   1200
         TabIndex        =   2
         Top             =   1320
         Width           =   3375
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "编号"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   11.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   225
         Left            =   1920
         TabIndex        =   1
         Top             =   2160
         Width           =   450
      End
   End
End
Attribute VB_Name = "frmA"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub cmdDel_Click()
   Call ClearFrm(Me)
End Sub

Private Sub cmdPrint_Click()
  If MsgBox("确定打印吗?", vbQuestion + vbYesNo, "问题") = vbYes Then
    TextPrint frmA
  End If
End Sub

Private Sub Frame1_DragDrop(Source As Control, X As Single, Y As Single)

End Sub

Private Sub Form_Resize()
  Static iLeft1, iLeft2, iTop1, iTop2
  Static ifrmWidth, ifrmHeight

  Debug.Print iLeft1, iLeft2, iTop1, iTop2
  Debug.Print ifrmWidth, ifrmHeight
  If Not (ifrmWidth = 0 Or ifrmHeight = 0) Then
  Picture1.Left = iLeft1 + (Me.Width - ifrmWidth) / 4
  Picture1.Top = iTop1 + (Me.Height - ifrmHeight) / 2
  Picture2.Left = iLeft2 + (Me.Width - ifrmWidth) / 2
  Picture2.Top = iTop2 + (Me.Height - ifrmHeight) / 2
  End If
  iLeft1 = Picture1.Left
  iLeft2 = Picture2.Left
  
  iTop1 = Picture1.Top
  iTop2 = Picture2.Top
  
  ifrmWidth = Me.Width
  ifrmHeight = Me.Height
End Sub

Private Sub txtFrmA_DblClick(Index As Integer)
Load frmCoord
  frmCoord.ShowFontSetting "txtFrmA" & Index, Me.Name
  frmCoord.Show 1
End Sub


Private Sub LoadDataA(ByVal strKey As String)
   Dim strSQL As String
   Dim rst As ADODB.Recordset
    On Error GoTo errLink
           
      'Call InitCombol(Me)
      'LockControl Me, False
      Debug.Print myDB

   If strKey = "" Then Exit Sub
   
   Set rst = New ADODB.Recordset
   
   
   strSQL = "select * from 基本情况 where 编号='" & strKey & "'"
   rst.Open strSQL, myDB
   If Not rst.EOF Then
      txtFrmA(0) = "" & rst("编号前缀")
      txtFrmA(2) = "" & Year(rst("日期")) & "年" & Month(rst("日期")) & "月" & Day(rst("日期")) & "日"
      txtFrmA(3) = "" & rst("申请人")
      txtFrmA(4) = "" & rst("项目名称")
      txtFrmA(5) = "" & rst("建设位置")
      txtFrmA(6) = "" & Up(rst("用地面积")) & "平方米"
      txtFrmA(7) = IIf(rst("东至") = "", "", "东至:" & rst("东至"))
      txtFrmA(8) = IIf(rst("西至") = "", "", "西至:" & rst("西至"))
      txtFrmA(9) = IIf(rst("南至") = "", "", "南至:" & rst("南至"))
      txtFrmA(10) = IIf(rst("北至") = "", "", "北至:" & rst("北至"))
   Else
      MsgBox "该项目不存在,请仔细核对!", vbInformation, "提示"
   End If
   rst.Close
   Set rst = Nothing
   Exit Sub
errLink:
    MsgBox err.Description, vbOKOnly + vbExclamation, "提示"
   
End Sub

Private Sub txtFrmA_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
   If Index = 1 And KeyCode = 13 Then
      Call LoadDataA(Trim(txtFrmA(1).Text))
   End If
End Sub

⌨️ 快捷键说明

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