如何用VB制作一个屏幕保护程序
来源:百度文库 编辑:神马文学网 时间:2024/04/26 15:47:48
添加一个窗体frm_Run,和frm_Setup。在frmRun中添加代码:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If Mod_Main.Scan_RUN Then ‘如果此时是在运行屏保则关闭屏保
modMain.CloseSCR
End If
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Mod_Main.Scan_RUN Then ‘如果此时是在运行屏保则关闭屏保
modMain.CloseSCR
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
modMain.CloseSCR
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Static sx As Single, sy As Single
If sx = 0 And sy = 0 Then
sx = X
sy = Y
Else
If Abs(sx - X) > 5 Or Abs(sy - Y) > 5 Then End ‘鼠标移动了5象素则退出
End If
End Sub
添加一个模块modMain,添加代码:
Option Explicit
Public Const WM_LOOK As String = “屏保预览(demo)“
Public Const WM_SET As String = “屏保设置(demo)“
Public Const WM_RUN As Stri
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If Mod_Main.Scan_RUN Then ‘如果此时是在运行屏保则关闭屏保
modMain.CloseSCR
End If
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Mod_Main.Scan_RUN Then ‘如果此时是在运行屏保则关闭屏保
modMain.CloseSCR
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
modMain.CloseSCR
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Static sx As Single, sy As Single
If sx = 0 And sy = 0 Then
sx = X
sy = Y
Else
If Abs(sx - X) > 5 Or Abs(sy - Y) > 5 Then End ‘鼠标移动了5象素则退出
End If
End Sub
添加一个模块modMain,添加代码:
Option Explicit
Public Const WM_LOOK As String = “屏保预览(demo)“
Public Const WM_SET As String = “屏保设置(demo)“
Public Const WM_RUN As Stri
如何用VB制作一个屏幕保护程序
如何用VB制作安装包
如何用VB创建汉字窗体
如何用VB编写键盘记录器
如何用Flash制作个性
如何用U5制作动画
如何用word制作图片
如何用Flash制作个性QQ表情
如何用Photoshop制作1寸照片
如何用图片制作来回滚动友情链接
如何用Dreamweaver轻松制作弹出菜单
如何用Dreamweaver轻松制作弹出菜单
如何用CSS制作横向菜单?
如何用PS制作身份证照片
如何用图片制作来回滚动友情链接
如何用ps制作GIF字体
如何用photoshop和imageready制作动画
如何用ps制作大图音画
如何用会10制作滚动字幕
如何用PhotoShop制作Gif动画
如何用PhotoShop制作Gif动画
如何用ps制作大图音画_
如何用word制作图片(2)
如何用word制作图片(3)