资源描述:
《伦教群控登陆画面代码》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、Logon登陆画面代码:OptionExplicit'DeclareFunctionsndPlaySoundLib"winmm.dll"Alias"sndPlaySoundA"(ByVallpszSoundNameAsString,ByValuFlagsAsLong)AsLongPrivateDeclareFunctionauxGetNumDevsLib"winmm.dll"()AsLongPrivateSubCommandButton1_Click()'OnLocalErrorGoToErrorHandlerDims
2、dAsStringDimiAsIntegeri=auxGetNumDevs()IfComboBox1.SelText=""Thenuser.ShowInforDlg"操作提示",1,"请选择用户名!"'UserForm1.ShowExitSubEndIfAdodc1.RecordSource="select*fromoperatorwhereusername='"&ComboBox1.SelText&"'"Adodc1.RefreshAdodc1.Recordset.MoveFirstIfNotAdodc1.Recor
3、dset.EOFThenIfTextBox1<>Adodc1.Recordset("userpassword").ValueThenuser.ShowInforDlg"操作提示",1," 密码不正确!"TextBox1.SetFocusTextBox1.SelStart=0TextBox1.SelLength=Len(TextBox1.Text)ExitSubEndIfElseuser.ShowInforDlg"操作提示",1,"用户名不正确!"ComboBox1.SetFocusExitSubEndIf'MsgBox
4、("成功")user.sCurUsername.CurrentValue=ComboBox1.SelTextuser.sCurUserpassword.CurrentValue=TextBox1.Textuser.iUserRight.CurrentValue=Adodc1.Recordset("userright").ValueAdodc1.Recordset.Closeuser.InsertOptLog"登录系统密码验证通过",""Ifi<0Then'user.ShowInforDlg"系统提示",1,"已经检测到
5、您的系统中存在声卡,可以进行语音报警"'Elseuser.ShowInforDlg"系统提示",1,"您的系统中没有安装声卡,无法实现语音报警功能"EndIf'''''''''''''''''''''''''''初始化语音报警列表监控工具栏.AddListview监控工具栏.Adodc1,监控工具栏.ListView1,监控工具栏.ListView2,"andSValue1='1'"'只列出要播放的报警'''''''''''''''''''''''''''''''''''''初始化调速器励磁参数Adodc3.Recor
6、dset.MoveFirstAdodc3.Recordset.Find"SName='禁止语音报警'"IfAdodc3.Recordset.EOF=FalseThen'检查是否查询到IfAdodc3.Recordset("SValue1").Value=0Thenuser.bSoundAlarm.CurrentValue=FalseElseuser.bSoundAlarm.CurrentValue=TrueEndIfElseuser.ShowInforDlg"数据库操作失败",1,"在最近一次查询后,数据库记录被其它程
7、序改变"EndIf监控工具栏.TextPicName.Caption="主目录"openpicture"主页"监控工具栏.writePicOrderToListBox"主页"openpicture("监控工具栏")openpicture"监控工具栏2",,0,100openpicture"闸门开度",,10,100监控工具栏2.TextPicName.Caption="伦教各水闸闸门开度画面"监控工具栏2.writePicOrderToListBox"闸门开度"'Application.Documents.OpenSy
8、stem.BasePath&"pdb语音报警.evs"'Application.Documents.OpenSystem.BasePath&"pdb机组1状态.evs"'Application.Documents.OpenSystem.BasePath&"pdb定时保存.evs"监控工具栏.zySave.StartTi