''下面代码是在一个文本文件(硬盘中建立的存放图片和声音文件名字的文本文件)中选择
图片和声音文件
Open "c:\在屏保制作
程序中你选择的图象和声音文件.txt" For Input As #1
Do While Not EOF(1)
Input #1, pic_musicfile
If Right(pic_musicfile, 3) = "wav" Or Right(pic_musicfile, 3) = "WAV" Then
music = pic_musicfile
Else
Set pic(picnum) = LoadPicture(pic_musicfile) ''读取选择的
图片 picnum = picnum + 1
End If
Loop
Close #1
ReDim Preserve pic(picnum)
If music <> "" Then sndPlaySound music, 9 ''播放声音
MODmain.Main
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If MODmain.Scan_RUN Then MODmain.CloseSCR ''如果此时是在运行屏保则关闭屏保
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If MODmain.Scan_RUN Then MODmain.CloseSCR ''如果此时是在运行屏保则关闭屏保
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If MODmain.Scan_RUN Then
If (OldX = -1) And (OldY = -1) Then
OldX = X
OldY = Y
Else
If Abs(X - OldX) >= 2 Then MODmain.CloseSCR
''将鼠标当前的水平坐标和垂直坐标与旧鼠标的水平坐标和垂直坐标相减其绝对值如果大于2个像素则退出屏保
End If
End If
&nbs