📄 frmc.frm
字号:
Begin VB.Label Label25
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "项目选定的地点和"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 360
TabIndex = 26
Top = 4320
Width = 1560
End
Begin VB.Label Label24
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用地面积(M2)"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 480
TabIndex = 25
Top = 3840
Width = 1200
End
Begin VB.Label Label23
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "建筑规模(M2)"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 480
TabIndex = 24
Top = 3360
Width = 1200
End
Begin VB.Label Label20
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "名 称"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 720
TabIndex = 23
Top = 3000
Width = 705
End
Begin VB.Label Label15
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "建设单位(个人)"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 480
TabIndex = 22
Top = 2760
Width = 1380
End
Begin VB.Label Label14
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用地项目名称"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 480
TabIndex = 21
Top = 2280
Width = 1170
End
Begin VB.Line Line20
X1 = 1920
X2 = 1920
Y1 = 2040
Y2 = 4920
End
Begin VB.Line Line19
X1 = 240
X2 = 5400
Y1 = 4920
Y2 = 4920
End
Begin VB.Line Line18
X1 = 240
X2 = 5400
Y1 = 4200
Y2 = 4200
End
Begin VB.Line Line17
X1 = 240
X2 = 5400
Y1 = 3720
Y2 = 3720
End
Begin VB.Line Line16
X1 = 240
X2 = 5400
Y1 = 3240
Y2 = 3240
End
Begin VB.Line Line15
X1 = 240
X2 = 5400
Y1 = 2640
Y2 = 2640
End
Begin VB.Line Line14
X1 = 5400
X2 = 5400
Y1 = 2040
Y2 = 6960
End
Begin VB.Line Line13
X1 = 240
X2 = 240
Y1 = 2040
Y2 = 6960
End
Begin VB.Line Line12
X1 = 240
X2 = 5400
Y1 = 6960
Y2 = 6960
End
Begin VB.Line Line11
X1 = 240
X2 = 5400
Y1 = 2040
Y2 = 2040
End
Begin VB.Line Line10
X1 = 480
X2 = 5280
Y1 = 1920
Y2 = 1920
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 = 4080
TabIndex = 6
Top = 1530
Width = 225
End
Begin VB.Label Label8
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "中 华 人 民 共 和 国"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 210
Left = 1800
TabIndex = 3
Top = 600
Width = 2100
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "村镇规划选址意见书"
BeginProperty Font
Name = "黑体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 240
Left = 1800
TabIndex = 2
Top = 1080
Width = 2160
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 = 840
TabIndex = 1
Top = 1560
Width = 450
End
End
End
Attribute VB_Name = "frmC"
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 txtFrmC_DblClick(Index As Integer)
Load frmCoord
frmCoord.ShowFontSetting "txtFrmC" & Index, Me.Name
frmCoord.Show 1
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 Me.Width >= 11925 And Me.Height >= 7950 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
'iLeft1 = Picture1.Left
'iLeft2 = Picture2.Left
'iTop1 = Picture1.Top
'iTop2 = Picture2.Top
' ifrmWidth = Me.Width
' ifrmHeight = Me.Height
' End If
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 LoadDataC(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
txtFrmC(0) = "" & rst("编号前缀")
txtFrmC(2) = "" & rst("项目名称")
txtFrmC(3) = "" & rst("申请人")
txtFrmC(4) = "" & Up(rst("建筑规模")) & "平方米"
txtFrmC(5) = "" & Up(rst("用地面积")) & "平方米"
txtFrmC(6) = "" & rst("建设位置")
txtFrmC(7) = "" & rst("东至")
txtFrmC(8) = "" & rst("西至")
txtFrmC(9) = "" & rst("南至")
txtFrmC(10) = "" & rst("北至")
txtFrmC(11) = "" & Year(rst("日期")) & "年" & Month(rst("日期")) & "月" & Day(rst("日期")) & "日"
Else
MsgBox "该项目不存在,请仔细核对!", vbInformation, "提示"
End If
rst.Close
Set rst = Nothing
Exit Sub
errLink:
MsgBox err.Description, vbOKOnly + vbExclamation, "提示"
End Sub
Private Sub txtFrmC_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
If Index = 1 And KeyCode = 13 Then
Call LoadDataC(Trim(txtFrmC(1).Text))
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -