1,453
社区成员




Private Sub Picture1_DblClick()
……………………………………
'这里原本是放上传程序的,想把它移出,在后台执行
'Timer1.Enabled = True '激活时间控件
'Timer1.Interval = 1000
Unload Me
End Sub
Private Sub Timer1_Timer()
'Path = "c:\screenShot.jpg"
S_Path = Format(Date, "YYYYMMDD") & Format(Time(), "HHMMSS") & ".jpg"
'上传截图到服务器上
Inet1.URL = "ftp://222.73.228.17"
Inet1.Protocol = icFTP
'Inet1.RemoteHost = "222.73.228.17"
Inet1.RemotePort = 21
Inet1.UserName = "scr"
Inet1.Password = "*****"
Inet1.Execute , "PUT " & Path & " " & S_Path
right1 = Inet1.StillExecuting
Do While right1
right1 = Inet1.StillExecuting
DoEvents
Loop
End Sub
Private Sub Timer1_Timer()
'Path = "c:\screenShot.jpg"
S_Path = Format(Date, "YYYYMMDD") & Format(Time(), "HHMMSS") & ".jpg"
'上传截图到服务器上
Inet1.URL = "ftp://222.73.228.17"
Inet1.Protocol = icFTP
'Inet1.RemoteHost = "222.73.228.17"
Inet1.RemotePort = 21
Inet1.UserName = "scr"
Inet1.Password = "*****"
Inet1.Execute , "PUT " & Path & " " & S_Path
right1 = Inet1.StillExecuting
Do While right1
right1 = Inet1.StillExecuting
DoEvents
Loop
Timer1.Enabled=False
End Sub
Private Sub Timer1_Timer()
'Path = "c:\screenShot.jpg"
S_Path = Format(Date, "YYYYMMDD") & Format(Time(), "HHMMSS") & ".jpg"
'上传截图到服务器上
Inet1.URL = "ftp://222.73.228.17"
Inet1.Protocol = icFTP
'Inet1.RemoteHost = "222.73.228.17"
Inet1.RemotePort = 21
Inet1.UserName = "scr"
Inet1.Password = "*****"
Inet1.Execute , "PUT " & Path & " " & S_Path
right1 = Inet1.StillExecuting
Do While right1
right1 = Inet1.StillExecuting
DoEvents
Loop
Timer1.Enabled=false '加上这一句
End Sub