资源描述:
《最新资料vbs的ql图书管理系统》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、Vb+sql2000图书管理代码及控件主要控件:Commandbutton,textbox,frame,label,Toolbar,ProgressBar,CommonDialog,Timer,StatusBar,ImageList,Adodc,DataGrid主界面模型图:图书管理主界面图书信息管理图书借阅管理读者信息管理添加修改删除图书信息图书所有信息查询图书信息添加修改删除借阅信息图书借阅查询添加删除修改读者信息查询读者信息1.登录界面设计过程:用于输入用户名和密码登录,若是用户输入用户名和
2、密码错误则不能进入系统。界面是一个GIF图片。来自于第三方控件。代码:PrivateSubcmdok_Click()DimcnAsNewADODB.ConnectionDimrsAsNewADODB.RecordsetDimflagAsBooleanDimcn_strAsString,sql_strAsStringcn_str="DRIVER={SQLSERVER};SERVER=QA2ONHYK7VWHRY2;DATABASE=library"cn.Opencn_strsql_str="sele
3、ctusername,userpfromuser_info"rs.Opensql_str,cnWhileNotrs.EOFIftxtusername.Text=Trim(rs(0))Andtxtpassword.Text=Trim(rs(1))ThenMe.Hideform8.Showflag=TrueExitSubElsers.MoveNextflag=FalseEndIfWendIfflag=FalseThenMsgBox"输入的用户名或密码有误,请重新输入!",vbCritical+vbOK
4、Only,"错误"rs.CloseEndIfEndSubPrivateSubCommand1_Click()IfMsgBox("你确定要退出?",vbYesNo)=vbNoThenfrmlogin.ShowElseUnloadMeEndIfEndSubPrivateSubtxtpassword_GotFocus()txtpassword=""txtpassword.PasswordChar="*"EndSubPrivateSubtxtusername_MouseMove(ButtonAsInteg
5、er,ShiftAsInteger,XAsSingle,YAsSingle)StaticToogleAsBooleanIfToogle=FalseThentxtusername=""Toogle=TrueEndIf2图书管理主界面设计过程:所有功能都在菜单中打开来实现。设计代码:PrivateSubadu_Click(IndexAsInteger)form3.ShowEndSubPrivateSubb_Click()DataReport1.ShowEndSubPrivateSubBEI_Click
6、()form4.ShowEndSubPrivateSubCommand1_Click()frmaduinfo.ShowEndSubPrivateSubCommand2_Click()frmseekxs.ShowEndSubPrivateSubCommand3_Click()frmaduclass_info.ShowEndSubPrivateSubCommand4_Click()frmaduclass_info.ShowEndSubPrivateSubCommand5_Click()frmadu_c
7、ourse.ShowEndSubPrivateSubCommand6_Click()frminquire_course.ShowEndSubPrivateSubCommand7_Click()frmmodify_result.ShowEndSubPrivateSubCommand8_Click()frminquire_result.ShowEndSubPrivateSubMDIForm_Load()Me.Left=GetSetting(App.Title,"setting","mainleft",
8、1000)Me.Top=GetSetting(App.Title,"setting","maintop",1000)Me.Width=GetSetting(App.Title,"setting","mainwidth",1000)Me.Height=GetSetting(App.Title,"setting","mainheight",1000)EndSubPrivateSubMDIForm_Unload(CancelAsInteger)IfMe.WindowState<>vbMi