📄 form1.frm
字号:
Height = 180
Left = 240
TabIndex = 26
Top = 3705
Width = 900
End
Begin VB.Label Label10
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "企业传真:"
Height = 180
Left = 240
TabIndex = 25
Top = 3285
Width = 900
End
Begin VB.Label Label9
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "企业电话:"
Height = 180
Left = 240
TabIndex = 24
Top = 2865
Width = 900
End
Begin VB.Label Label8
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "邮政编码:"
Height = 180
Left = 240
TabIndex = 23
Top = 2475
Width = 900
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "企业地址:"
Height = 180
Left = 240
TabIndex = 22
Top = 2025
Width = 900
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "企业行业:"
Height = 180
Left = 240
TabIndex = 21
Top = 1605
Width = 900
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "企业性质:"
Height = 180
Left = 240
TabIndex = 20
Top = 1185
Width = 900
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "企业助记码:"
Height = 180
Left = 60
TabIndex = 19
Top = 810
Width = 1080
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "企业名称:"
Height = 180
Left = 240
TabIndex = 18
Top = 360
Width = 900
End
End
Begin CSCommand.Command Command1
Height = 405
Left = 5265
TabIndex = 36
Top = 6900
Width = 1200
_ExtentX = 2117
_ExtentY = 714
IconAlign = 0
Icon = "Form1.frx":0A02
Caption = "保存 &S"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Label EditId
AutoSize = -1 'True
BackStyle = 0 'Transparent
Height = 180
Left = 660
TabIndex = 37
Top = 6855
Visible = 0 'False
Width = 90
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'枕善居收藏整理
'发布日期:2007/12/24
'描 述:商务名片及客户资料管理系统 Ver 1.73
'网 站:http://www.Mndsoft.com/ (VB6源码博客)
'网 站:http://www.VbDnet.com/ (VB.NET源码博客,主要基于.NET2005)
'e-mail :Mndsoft@163.com
'e-mail :Mndsoft@126.com
'OICQ :88382850
' 如果您有新的好的代码别忘记给枕善居哦!
'****************************************************************************
Option Explicit
Private Sub Command1_Click()
If Trim(Text3.Text) = "" Then
MsgBox "企业名称不得为空,请仔细填写各项。", vbInformation, "名称为空"
Exit Sub
End If
If Trim(Text3.Text) = "" Or Trim(Text4.Text) = "" Or Trim(Text5.Text) = "" Or Trim(Text6.Text) = "" Then
MsgBox "输入框后面标上星号的项目为必须填写的东西,请认真填写各项信息,否则无法完成添加操作。", vbInformation, "信息不全"
Exit Sub
End If
Text13.Text = Trim(Text13.Text)
If Len(Text13.Text) > 700 Then
MsgBox "经营范围的文字内容过长,请保持在700字范围内,否则在导出的时候可能会出错!究竟为什么会出错,我也没搞清楚,反正就会出错。", vbInformation, "内容过长"
Exit Sub
End If
Dim db As Database
Dim rs As Recordset
Set db = OpenDatabase(MdbPath)
Set rs = db.OpenRecordset("select * from com")
rs.AddNew
rs!企业名称 = Trim(Text3.Text)
rs!企业助记码 = Trim(Text4.Text)
rs!企业性质 = Trim(Text5.Text)
rs!企业行业 = Trim(Text6.Text)
rs!企业地址 = Trim(Text7.Text)
rs!邮政编码 = Trim(Text8.Text)
rs!企业电话 = Trim(Text12.Text)
rs!企业传真 = Trim(Text11.Text)
rs!企业网址 = Trim(Text10.Text)
rs!经营范围 = Trim(Text13.Text)
rs!法人代表 = Trim(Text9.Text)
rs.Update
MsgBox "添加商家成功!", vbInformation, "添加完毕"
SumNumber
If (FrmRenAddShow <> True) And (Check1.Value = 1) Then
Load FrmRenAdd
FrmRenAdd.Show
FrmRenAdd.Text1.Text = Trim(Me.Text9.Text)
End If
rs.Close
Set rs = Nothing
db.Close
Set db = Nothing
Unload Me
End Sub
Private Sub Command2_Click()
Load FrmHangye
FrmHangye.Show
FrmHangye.Text5.Text = "添加"
End Sub
Private Sub Command3_Click()
Load Form18
Form18.Show
Form18.Text5 = "添加"
End Sub
Private Sub Form_Activate()
ShowForm4
End Sub
Private Sub Form_Load()
Me.BackColor = FormBackColor
Me.Icon = MDIForm1.Icon
Me.Check1.BackColor = Me.BackColor
Me.Frame1.BackColor = Me.BackColor
Me.Frame2.BackColor = Me.BackColor
Me.Height = 7995
Me.Width = 7095
Me.Top = (Screen.Height - Me.Height) / 4
Me.Left = (Screen.Width - Me.Width) / 2
Dim db As Database
Dim rs As Recordset
Set db = OpenDatabase(MdbPath)
Set rs = db.OpenRecordset("select * from proset")
If rs.RecordCount = 0 Then
Me.Text8.Text = ""
ElseIf rs.RecordCount > 0 Then
If IsNull(rs!yb) = False Then
Me.Text8.Text = Trim(rs!yb)
Else
Me.Text8.Text = ""
End If
End If
rs.Close
ShowForm4
SetWindowPos Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
'Me.Label15.Caption = Date
form1show = True
Me.Text1.Text = " " & MdbPath
Me.Text14.Text = " " & App.Major & "." & App.Minor & "." & App.Revision
Set rs = db.OpenRecordset("select * from com")
If rs.RecordCount = 0 Then
Me.Text2.Text = "0"
ElseIf rs.RecordCount > 0 Then
rs.MoveLast
Me.Text2.Text = rs.RecordCount
End If
rs.Close
Set rs = Nothing
db.Close
Set db = Nothing
End Sub
Private Sub Form_Resize()
On Error GoTo errcode
Me.Height = 7995
Me.Width = 7095
errcode:
End Sub
Private Sub Form_Unload(Cancel As Integer)
form1show = False
End Sub
Private Sub Text10_GotFocus()
SendKeys "{end}"
End Sub
Private Sub Text11_GotFocus()
SendKeys "{end}"
End Sub
Private Sub Text12_GotFocus()
SendKeys "{end}"
End Sub
Private Sub Text13_GotFocus()
SendKeys "{end}"
End Sub
Private Sub Text3_Change()
Text4.Text = UCase(AutoPY1.AutoPY(Trim(Text3.Text)))
End Sub
Private Sub Text3_GotFocus()
SendKeys "{end}"
End Sub
Private Sub Text4_GotFocus()
SendKeys "{end}"
End Sub
Private Sub Text4_LostFocus()
Text4.Text = UCase(Text4.Text)
End Sub
Private Sub Text5_GotFocus()
SendKeys "{end}"
End Sub
Private Sub Text6_GotFocus()
SendKeys "{end}"
End Sub
Private Sub Text7_GotFocus()
SendKeys "{end}"
End Sub
Private Sub Text8_GotFocus()
SendKeys "{end}"
End Sub
Private Sub Text9_GotFocus()
SendKeys "{end}"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -