[源代码分享计划](二)瑞星个人客户服务系统
标题:瑞星个人客户服务系统适用类:利用Shell打开URL,略简单。
编译工具:Visual Basic6.0
界面:
界面实质上是没有设计好,太大了。。如果你的屏幕略小的话。。应该是不能够显示完全。
控件集:Image和Frame居多。还有菜单栏的设计,新手可以看一下。
代码:(包括注释+讲解)
程序代码:
Option Explicit '*************************************************** '因为我个人也是一个菜鸟,所以有些代码是来自不同的教材中 '不著明版权,学习交流之用 '发布在https://bbs.bccn.net/编程论坛。 '*************************************************** Private Sub Aboutme_Click() frmAbout.Show '调用frmAbout窗体,也就是关于窗体。。这个是装逼的。。可以无视。。。 End Sub Private Sub Command5_Click() Dim lngReturn As Long '定义长整型变量lngreturn lngReturn = ShellExecute(Me.hwnd, "open", "http://www.baidu.com", "", "", 0) Rem 利用ShellExecute打开指定的URL。 End Sub Private Sub Command6_Click() '定义长整型变量lngreturn Dim lngReturn As Long lngReturn = ShellExecute(Me.hwnd, "open", "http://www.baidu.com", "", "", 0) Rem 利用ShellExecute打开指定的URL。 End Sub Private Sub Command7_Click() '定义长整型变量lngreturn Dim lngReturn As Long lngReturn = ShellExecute(Me.hwnd, "open", "http://www.baidu.com", "", "", 0) Rem 利用ShellExecute打开指定的URL。 End Sub Private Sub EnterSystem_Click() Form2.Show Unload Me End Sub Private Sub Image10_Click() MsgBox "请用二维码扫描APP进行扫描!", vbOKOnly + vbInformation, "提示" Rem 交互设计 End Sub Private Sub Image10_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Image10.BorderStyle = 1 '包括下一句代码,这都是为了实现Image图片的点击效果。(实现跟Command一样的效果) Rem 编程要有自己的思想,不要局限于系统已经给你设定好的东西,编程要颠覆能够颠覆的一切。 End Sub Private Sub Image10_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) Image10.BorderStyle = 0 End Sub Private Sub Image11_Click() MsgBox "请用二维码扫描APP进行扫描!", vbOKOnly + vbInformation, "提示" End Sub Private Sub Image11_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Image11.BorderStyle = 1 End Sub Private Sub Image11_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) Image11.BorderStyle = 0 End Sub Private Sub Image12_Click() MsgBox "您即将进入瑞星安全论坛,请稍等。", vbOKOnly + vbInformation, "提示" '这个大家相信都能看懂吧,很简单的程序。 lngReturn = ShellExecute(Me.hwnd, "open", "http://bbs.", "", "", 0) End Sub Private Sub Image12_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Image12.BorderStyle = 1 End Sub Private Sub Image12_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) Image12.BorderStyle = 0 End Sub Private Sub Image13_Click() MsgBox "系统即将进入误报上传系统,请稍等。", vbOKOnly + vbInformation, "提示" '实质就是利用Shell 来打开网页 lngReturn = ShellExecute(Me.hwnd, "open", "http://mailcenter.", "", "", 0) End Sub Private Sub Image13_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Image13.BorderStyle = 1 End Sub Private Sub Image13_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) Image13.BorderStyle = 0 End Sub Private Sub Image14_Click() MsgBox "系统即将下载瑞星杀毒软件V16+,请稍等。", vbOKOnly + vbInformation, "提示" lngReturn = ShellExecute(Me.hwnd, "open", "http://", "", "", 0) End Sub Private Sub Image14_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Image14.BorderStyle = 1 End Sub Private Sub Image14_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) Image14.BorderStyle = 0 End Sub Private Sub Image15_Click() MsgBox "系统即将下载瑞星个人防火墙V16,请稍等。", vbOKOnly + vbInformation, "提示" lngReturn = ShellExecute(Me.hwnd, "open", "http://", "", "", 0) End Sub Private Sub Image15_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Image15.BorderStyle = 1 End Sub Private Sub Image15_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) Image15.BorderStyle = 0 End Sub Private Sub Image16_Click() FrmRav2011Chose.Show End Sub Private Sub Image16_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Image16.BorderStyle = 1 End Sub Private Sub Image16_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) Image16.BorderStyle = 0 End Sub Private Sub Image17_Click() FrmRis2011Chose.Show End Sub Private Sub Image17_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Image17.BorderStyle = 1 End Sub Private Sub Image17_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) Image17.BorderStyle = 0 End Sub Private Sub Image18_Click() MsgBox "系统即将下载瑞星安全助手,请稍等。", vbOKOnly + vbInformation, "提示" lngReturn = ShellExecute(Me.hwnd, "open", "http://rsdownload.", "", "", 0) End Sub Private Sub Image18_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Image18.BorderStyle = 1 End Sub Private Sub Image18_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) Image18.BorderStyle = 0 End Sub Private Sub Image19_Click() MsgBox "系统即将下载瑞星路由安全卫士,请稍等。", vbOKOnly + vbInformation, "提示" lngReturn = ShellExecute(Me.hwnd, "open", "http://rsdownload.", "", "", 0) End Sub Private Sub Image19_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Image19.BorderStyle = 1 End Sub Private Sub Image19_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) Image19.BorderStyle = 0 End Sub Private Sub Image20_Click() MsgBox "系统即将下载瑞星手机安全助手,请稍等......" & Chr(13) & "下载完毕后,您可以通过数据线或SD卡导入手机进行安装!", vbOKOnly + vbInformation, "提示" lngReturn = ShellExecute(Me.hwnd, "open", "http://download.", "", "", 0) End Sub Private Sub Image20_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Image20.BorderStyle = 1 End Sub Private Sub Image20_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) Image20.BorderStyle = 0 End Sub Private Sub Image8_Click() lngReturn = ShellExecute(Me.hwnd, "open", "http://", "", "", 0) End Sub Private Sub Image8_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Image8.BorderStyle = 1 End Sub Private Sub Image8_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) Image8.BorderStyle = 0 End Sub Private Sub Image9_Click() lngReturn = ShellExecute(Me.hwnd, "open", "http://t.", "", "", 0) End Sub Private Sub Image9_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Image9.BorderStyle = 1 End Sub Private Sub Image9_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) Image9.BorderStyle = 0 End Sub Private Sub ImageKnow_Click() MsgBox "欢迎使用瑞星知道问答平台,正在进入......请稍后。", vbOKOnly + vbInformation, "提示" lngReturn = ShellExecute(Me.hwnd, "open", "http://zhidao.", "", "", 0) End Sub Private Sub ImageKnow_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) ImageKnow.BorderStyle = 1 End Sub Private Sub ImageKnow_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) ImageKnow.BorderStyle = 0 End Sub Private Sub ImagePhoneServices_Click() MsgBox "瑞星个人产品服务热线:400-660-8866" & Chr(10) & "北京及未开通400电话的其他地区:010-82678800" & Chr(10) & "欢迎您的来电!", vbOKOnly + vbInformation, "提示" End Sub Private Sub ImagePhoneServices_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) ImagePhoneServices.BorderStyle = 1 End Sub Private Sub ImagePhoneServices_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) ImagePhoneServices.BorderStyle = 0 End Sub Private Sub ImagePost_Click() MsgBox "欢迎使用瑞星邮件服务,正在进入......请稍后。", vbOKOnly + vbInformation, "提示" lngReturn = ShellExecute(Me.hwnd, "open", "http://mailcenter.", "", "", 0) End Sub Private Sub ImagePost_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) ImagePost.BorderStyle = 1 End Sub Private Sub ImagePost_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) ImagePost.BorderStyle = 0 End Sub Private Sub ImageRiSingProduct_Click() MsgBox "欢迎使用个人版瑞星在线服务系统,正在进入......请稍后。", vbOKOnly + vbInformation, "提示" lngReturn = ShellExecute(Me.hwnd, "open", "http://chat.免费专家门诊服务&link_str=瑞星个人级产品&link_url=http://zhidao.", "", "", 0) End Sub Private Sub ImageRiSingProduct_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) ImageRiSingProduct.BorderStyle = 1 End Sub Private Sub ImageRiSingProduct_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) ImageRiSingProduct.BorderStyle = 0 End Sub Private Sub Miss_Click() MsgBox "您选择了离线安装方式,离线安装可能会需要较长时间,请您耐心等待!", vbOKOnly + vbInformation, "提示" lngReturn = ShellExecute(Me.hwnd, "open", "http://", "", "", 0) End Sub Private Sub Miss2011_Click() MsgBox "您选择了离线安装方式,离线安装可能会需要较长时间,请您耐心等待!", vbOKOnly + vbInformation, "提示" lngReturn = ShellExecute(Me.hwnd, "open", "http://", "", "", 0) End Sub Private Sub Mobbile_Click() MsgBox "系统即将下载瑞星手机安全助手,请稍等......" & Chr(13) & "下载完毕后,您可以通过数据线或SD卡导入手机进行安装!", vbOKOnly + vbInformation, "提示" lngReturn = ShellExecute(Me.hwnd, "open", "http://download.", "", "", 0) End Sub Private Sub Online_Click() MsgBox "您选择了在线安装方式,系统即将下载所需文件,请稍等。", vbOKOnly + vbInformation, "提示" lngReturn = ShellExecute(Me.hwnd, "open", "http://", "", "", 0) End Sub Private Sub Online2011_Click() MsgBox "您选择了在线安装方式,系统即将下载所需文件,请稍等。", vbOKOnly + vbInformation, "提示" lngReturn = ShellExecute(Me.hwnd, "open", "http://www.", "", "", 0) End Sub Private Sub RavUpdate_Click() MsgBox "系统即将下载瑞星杀毒软件V16+,请稍等。", vbOKOnly + vbInformation, "提示" lngReturn = ShellExecute(Me.hwnd, "open", "http://", "", "", 0) End Sub Private Sub RfwUpdate_Click() MsgBox "系统即将下载瑞星个人防火墙V16,请稍等。", vbOKOnly + vbInformation, "提示" lngReturn = ShellExecute(Me.hwnd, "open", "http://", "", "", 0) End Sub Private Sub RiSing_Click() MsgBox "抱歉,此功能正在开发中......", vbOKOnly + vbInformation, "提示" End Sub Private Sub Timer1_Timer() Label19.Caption = Now End Sub Private Sub Tplink_Click() MsgBox "系统即将下载瑞星路由安全卫士,请稍等。", vbOKOnly + vbInformation, "提示" lngReturn = ShellExecute(Me.hwnd, "open", "http://rsdownload.", "", "", 0) End Sub Private Sub Unloadme_Click() Dim a a = MsgBox("确定退出本系统?", 4 + vbCritical, "请确认") If a = vbYes Then Unload Me '退出系统 End If End Sub Private Sub Zhushou_Click() MsgBox "系统即将下载瑞星安全助手,请稍等。", vbOKOnly + vbInformation, "提示" lngReturn = ShellExecute(Me.hwnd, "open", "http://rsdownload.", "", "", 0) End Sub '----------FrmLogin----- Option Explicit Private Sub Form_Load() WebBrowser1.Navigate2 ("http://mwm.") '窗体一载入内存的时候就开始连接并打开指定的URL。 Rem 这个可以看一下网络编程,需要添加WebBrowser控件。 End Sub Private Sub Image1_Click() WebBrowser1.Navigate2 ("http://mwm.") '刷新,即从新载入指定URL. End Sub Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Image1.BorderStyle = 1 End Sub Private Sub Image1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) Image1.BorderStyle = 0 End Sub Private Sub Image2_Click() FrmLogin.Show '返回到主界面。 Unload Me End Sub Private Sub Image2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Image2.BorderStyle = 1 End Sub Private Sub Image2_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) Image2.BorderStyle = 0 End Sub --------Form2 Option Explicit Private Sub Timer1_Timer() If Timer1.Interval = 3000 Then '这个之前是为了用户等待恶意网址界面而设计的,但是没有用上。 Unload Me End If End Sub ---------Formwait Option Explicit Private Sub Image3_Click() Rem 简单的If判断语句。If语句不懂的话,这个真没法讲,建议还是 看看书。 If Option1.Value = True Then MsgBox "您选择了在线安装方式,系统即将下载所需文件,请稍等。", vbOKOnly + vbInformation, "提示" lngReturn = ShellExecute(Me.hwnd, "open", "http://", "", "", 0) Unload Me Else MsgBox "您选择了离线安装方式,离线安装可能会需要较长时间,请您耐心等待!", vbOKOnly + vbInformation, "提示" lngReturn = ShellExecute(Me.hwnd, "open", "http://", "", "", 0) Unload Me End If End Sub Private Sub Image3_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Image3.BorderStyle = 1 End Sub Private Sub Image3_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) Image3.BorderStyle = 0 End Sub ---------FrmRav2011Chose代码比较长,但是很简单,都是最基础的东西。
程序:
瑞星个人客户服务系统总汇.zip
(1.58 MB)
大家对代码有任何疑问都可以提出,能帮助大家的一定帮助。
其他相关实例:
[源代码分享计划](一)Visual Basic文件操作程序:https://bbs.bccn.net/thread-444084-1-1.html
菜鸟谈一谈Visual Basic6.0编程之路:https://bbs.bccn.net/thread-443945-1-1.html
甜橙计算软件,给VB初学者好的例子。:https://bbs.bccn.net/thread-426678-1-1.html