📄 frm_yhzc.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frm_YHZC
BorderStyle = 3 'Fixed Dialog
Caption = "用户注册窗口"
ClientHeight = 2850
ClientLeft = 2640
ClientTop = 2535
ClientWidth = 6825
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2850
ScaleWidth = 6825
ShowInTaskbar = 0 'False
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 3120
Top = 2400
Visible = 0 'False
Width = 1575
_ExtentX = 2778
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=ljm"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=ljm"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from Table_YHZC"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.TextBox Text6
DataField = "公司名称"
DataSource = "Adodc1"
Height = 375
Left = 480
TabIndex = 13
Text = "Text6"
Top = 3000
Width = 3495
End
Begin VB.CheckBox Check2
Caption = "Check2"
DataField = "是否注册"
DataSource = "Adodc1"
Height = 375
Left = 2280
TabIndex = 12
Top = 2400
Visible = 0 'False
Width = 735
End
Begin VB.TextBox Text5
DataField = "ID"
DataSource = "Adodc1"
Height = 375
Left = 1680
TabIndex = 11
Text = "Text5"
Top = 2400
Visible = 0 'False
Width = 495
End
Begin VB.TextBox Text4
Height = 375
Left = 1080
TabIndex = 10
Text = "111"
Top = 2400
Visible = 0 'False
Width = 495
End
Begin VB.CheckBox Check1
Caption = "Check1"
Height = 375
Left = 120
TabIndex = 9
Top = 2400
Visible = 0 'False
Width = 975
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 5760
TabIndex = 8
Top = 2400
Width = 975
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 4680
TabIndex = 7
Top = 2400
Width = 975
End
Begin VB.Frame Frame1
Height = 2175
Left = 120
TabIndex = 0
Top = 120
Width = 6615
Begin VB.TextBox Text3
Height = 375
Left = 2520
TabIndex = 6
Top = 1560
Width = 3855
End
Begin VB.TextBox Text2
Height = 375
Left = 2520
TabIndex = 4
Top = 960
Width = 3855
End
Begin VB.TextBox Text1
Height = 375
Left = 2520
TabIndex = 2
Top = 360
Width = 3855
End
Begin VB.Label Label3
Caption = "请输入公司的注册码"
Height = 400
Left = 240
TabIndex = 5
Top = 1680
Width = 1695
End
Begin VB.Label Label2
Caption = "请输入公司的编码"
Height = 255
Left = 240
TabIndex = 3
Top = 1080
Width = 1575
End
Begin VB.Label Label1
Caption = "请输入公司的名称"
Height = 255
Left = 240
TabIndex = 1
Top = 480
Width = 1575
End
End
End
Attribute VB_Name = "frm_YHZC"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public adoCon As New ADODB.Connection
Public adoRs As New ADODB.Recordset
Private Sub Command1_Click()
If Text1 = "" Then
MsgBox "输入的公司名称不能为空", 48, "房地产销售管理系统"
Text1.SetFocus
ElseIf Text2.Text = "" Then
MsgBox "输入的公司编码不能为空", 48, "房地产销售管理系统"
Text2.SetFocus
ElseIf Text3.Text = "" Then
MsgBox "输入的公司注册码不能为空", 48, "房地产销售管理系统"
Text3.SetFocus
Else
Adodc1.RecordSource = "select * from Table_YHZC where 公司名称 ='" & Text1.Text & "' And 公司编码='" & Text2.Text & "'And 公司注册码='" & Text3.Text & "'"
Adodc1.Refresh
If Adodc1.Recordset.EOF Then
MsgBox "对不起,您的输入有误,不能成功地注册到本系统", 64, "房地产销售管理系统"
Else
Check1.Value = 1
Adodc1.Recordset.Delete
Text4 = Val(Text4.Text) + 1
Set adoRs = adoCon.Execute("insert into Table_YHZC values(" & Text4 & ",'" & Text1 & "','" & Text2 & "','" & Text3 & "','" & Check1 & "')")
frm_YHZC.Hide
MDI_main.Show
MDI_main.Caption = frm_YHZC.Text6.Text + "房地产销售管理系统"
End If
End If
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
'Set adoCon = New ADODB.Connection
'adoCon.Open "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=ljm"
' Set adoRs = adoCon.Execute("select * from Table_YHZC")
'Check2.Value = adoRs.Fields("是否注册")
If frm_YHZC.Check2.Value = 1 Then
MDI_main.Caption = frm_YHZC.Text6.Text + "房地产销售管理系统"
frm_GSXX.Text1.Text = frm_YHZC.Text6.Text
MDI_main.Show
' frm_XTDL.Show
frm_YHZC.Hide
Else
frm_YHZC.Show
MDI_main.Hide
End If
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text2.SetFocus
Else
End If
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text3.SetFocus
Else
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -