关于VB中的一段程序,请高手指点
这是一段关于开发网络聊天程序的添加新用户的一段程序我看不懂,请高手帮忙指点下嘛,大概的给我讲解下,拜托了ivateSubcmdOK_Click()OnErrorGoToc...
这是一段关于开发网络聊天程序的添加新用户的一段程序
我看不懂,请高手帮忙指点下嘛,大概的给我讲解下,
拜托了
ivate Sub cmdOK_Click()
On Error GoTo cmdOKOfADDUser_Err
Dim uID As String * 15, uPassword As String * 16, uPassPort As String * 30
Dim rs As New ADODB.Recordset
Dim SQLString As String
uID = txtUserID.Text
uPassword = txtUserPsw.Text
uPassPort = txtUserPassport.Text
If Len(Trim(txtUserID.Text)) = 0 Or Len(txtUserPsw.Text) = 0 _
Or Len(txtUserPsw.Text) = 0 Or Len(Trim(txtUserPassport.Text)) = 0 Then
MsgBox "本窗口内所有信息都必须填写!", vbOKOnly + vbExclamation, "添加用户"
Exit Sub
End If
If ItemCheck(txtUserID.Text) = False Then
txtUserID.Text = ""
txtUserID.SetFocus 展开
我看不懂,请高手帮忙指点下嘛,大概的给我讲解下,
拜托了
ivate Sub cmdOK_Click()
On Error GoTo cmdOKOfADDUser_Err
Dim uID As String * 15, uPassword As String * 16, uPassPort As String * 30
Dim rs As New ADODB.Recordset
Dim SQLString As String
uID = txtUserID.Text
uPassword = txtUserPsw.Text
uPassPort = txtUserPassport.Text
If Len(Trim(txtUserID.Text)) = 0 Or Len(txtUserPsw.Text) = 0 _
Or Len(txtUserPsw.Text) = 0 Or Len(Trim(txtUserPassport.Text)) = 0 Then
MsgBox "本窗口内所有信息都必须填写!", vbOKOnly + vbExclamation, "添加用户"
Exit Sub
End If
If ItemCheck(txtUserID.Text) = False Then
txtUserID.Text = ""
txtUserID.SetFocus 展开
展开全部
pivate Sub cmdOK_Click() '记录一个过程
On Error GoTo cmdOKOfADDUser_Err '错误处理语句
Dim uID As String * 15, uPassword As String * 16, uPassPort As String * 30 '定义变量
Dim rs As New ADODB.Recordset '定义数据集对象
Dim SQLString As String '定义变量
uID = txtUserID.Text '输值语句
uPassword = txtUserPsw.Text '输值语句
uPassPort = txtUserPassport.Text '输值语句
If Len(Trim(txtUserID.Text)) = 0 Or Len(txtUserPsw.Text) = 0 _
Or Len(txtUserPsw.Text) = 0 Or Len(Trim(txtUserPassport.Text)) = 0 Then '判断语句,三个判断条件
MsgBox "本窗口内所有信息都必须填写!", vbOKOnly + vbExclamation, "添加用户" '消息对话框
Exit Sub '条件成立,退出过程
End If
If ItemCheck(txtUserID.Text) = False Then '判断语句
txtUserID.Text = "" '输值语句
好像没有完吧?
On Error GoTo cmdOKOfADDUser_Err '错误处理语句
Dim uID As String * 15, uPassword As String * 16, uPassPort As String * 30 '定义变量
Dim rs As New ADODB.Recordset '定义数据集对象
Dim SQLString As String '定义变量
uID = txtUserID.Text '输值语句
uPassword = txtUserPsw.Text '输值语句
uPassPort = txtUserPassport.Text '输值语句
If Len(Trim(txtUserID.Text)) = 0 Or Len(txtUserPsw.Text) = 0 _
Or Len(txtUserPsw.Text) = 0 Or Len(Trim(txtUserPassport.Text)) = 0 Then '判断语句,三个判断条件
MsgBox "本窗口内所有信息都必须填写!", vbOKOnly + vbExclamation, "添加用户" '消息对话框
Exit Sub '条件成立,退出过程
End If
If ItemCheck(txtUserID.Text) = False Then '判断语句
txtUserID.Text = "" '输值语句
好像没有完吧?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询