www.pudn.com > SafetyNet.rar > Form1.frm


VERSION 5.00 
Begin VB.Form Form1  
   AutoRedraw      =   -1  'True 
   BackColor       =   &H80000012& 
   BorderStyle     =   0  'None 
   ClientHeight    =   9705 
   ClientLeft      =   0 
   ClientTop       =   0 
   ClientWidth     =   14535 
   Icon            =   "Form1.frx":0000 
   LinkTopic       =   "Form2" 
   ScaleHeight     =   9705 
   ScaleWidth      =   14535 
   ShowInTaskbar   =   0   'False 
   StartUpPosition =   3  '窗口缺省 
   WindowState     =   2  'Maximized 
   Begin VB.ListBox List1  
      Height          =   2940 
      Left            =   315 
      TabIndex        =   1 
      Top             =   675 
      Visible         =   0   'False 
      Width           =   1545 
   End 
   Begin VB.Timer Timer1  
      Interval        =   100 
      Left            =   690 
      Top             =   2745 
   End 
   Begin VB.PictureBox Picture1  
      Appearance      =   0  'Flat 
      AutoSize        =   -1  'True 
      BackColor       =   &H80000005& 
      ForeColor       =   &H80000008& 
      Height          =   5130 
      Left            =   14475 
      ScaleHeight     =   340 
      ScaleMode       =   3  'Pixel 
      ScaleWidth      =   347 
      TabIndex        =   0 
      Top             =   9660 
      Width           =   5235 
   End 
End 
Attribute VB_Name = "Form1" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long 
Private Sub Form_Load() 
  On Error GoTo err1 
  X = ShowCursor(False) 
  Select Case UCase(Left(Command, 2)) 
    Case "/A" 
      MsgBox "无法设置密码!", , "明日图书" 
      End 
    Case "/C" 
      MsgBox "没有提供设置值功能!", , "明日图书" 
      End 
     Case "/P" 
       End 
     Case "/S" 
  End Select 
  Dim fs, fc, f1 
  Set fs = CreateObject("Scripting.FileSystemObject") 
  Set f = fs.GetFolder(App.Path & "\picture") 
  Set fc = f.Files 
  For Each f1 In fc 
     If f1.Name <> "Thumbs.db" Then 
       List1.AddItem f1.Name 
     End If 
  Next 
  Picture1.Left = -5500 
  Picture1.Top = -5500 
  Picture1.Picture = LoadPicture(App.Path & "\picture\" & List1.List(0)) 
  Exit Sub 
err1: 
  MsgBox Err.Description, , "明日图书" 
End Sub 
Private Sub Form_Click() 
  X = ShowCursor(True) 
  End 
End Sub 
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) 
  X = ShowCursor(True) 
  End 
End Sub 
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) 
  Static ox 
  Static oy 
  If ox = 0 And oy = 0 Then 
    ox = X 
    oy = Y 
  ElseIf (X <> ox) Or (Y <> oy) Then 
    X = ShowCursor(True) 
    End 
  End If 
End Sub 
Private Sub Timer1_Timer() 
  If App.PrevInstance Then End 
  Me.WindowState = vbMaximized 
  If Picture1.Left > 8000 And Picture1.Top > 10000 Then 
    Picture1.Left = -5000 
    Picture1.Top = -5000 
    If List1.ListIndex < List1.ListCount - 1 Then 
      List1.ListIndex = List1.ListIndex + 1 
    Else 
      List1.ListIndex = 0 
    End If 
    Picture1.Picture = LoadPicture(App.Path & "\picture\" & List1.Text) 
  End If 
  If Picture1.Left > -6000 And Picture1.Top > -6000 Then 
     Picture1.Move Picture1.Left + 100, Picture1.Top + 100 
  End If 
End Sub