电脑开了很多窗口,例如excel等。在运行下面这个程序的时候,会把狐表切到后面,漏出其他窗口。然后用户每次都需要再次选择狐表主窗口。请问为何?如何处理
Dim fileloc As String=Args(0)
Dim filenam,newfileloc As String
filenam=FileSys.GetName(fileloc) ''获取文件名
Dim ex As String = filenam.SubString(filenam.LastIndexOf(".") + 1)
If FileSys.DirectoryExists(ProjectPath & "tempfile")=False Then
FileSys.CreateDirectory(ProjectPath & "tempfile")
End If
newfileloc= ProjectPath & "tempfile\zipfs\file" & Rand.Next(10) & "." & ex
FileSys.CopyFile(fileloc, newfileloc,True)
Dim Val2 As Integer = Rand.Next(1000)
Dim zip As New zipFile
fileloc=ProjectPath & "tempfile\zipfs\tempzip" & Val2 & ".zip"
Do While FileSys.FileExists(fileloc)
Val2 = Rand.Next(1000)
fileloc=ProjectPath & "tempfile\zipfs\tempzip" & Val2 & ".zip"
Loop
zip.Create(fileloc)
zip.AddFile(newfileloc)
zip.Close()
Return fileloc