之前他是这么来实现的。
我可以调用WaitShow,打开动画窗口,调用WaitClose来关闭动画窗口
这中间,就可以加自己的代码了
Public Sub WaitShow()
Try
processForm = New System.Windows.Forms.Form
Dim wfpic As New System.Windows.Forms.PictureBox()
Dim strImageFile As String
wfpic.Image = System.Drawing.Image.FromFile(strImageFile)
wfpic.Dock = System.Windows.Forms.DockStyle.Fill
wfpic.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
processForm.Controls.Add(wfpic)
processForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
processForm.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
processForm.TransparencyKey = Color.white
processForm.backcolor = Color.white
processForm.OPacity = 1
processForm.ShowInTaskBar = False
If Vars("gdSaveFormRate") = 0 Then Vars("gdSaveFormRate") = 4
wfpic.Width = 1280/Vars("gdSaveFormRate") '固定大小
wfpic.Height = 720/Vars("gdSaveFormRate")
processForm.TopMost = True
Dim upgradeThread As System.Threading.Thread = New System.Threading.Thread(New System.Threading.ThreadStart(AddressOf ShowWaitMess))
upgradeThread.Start()
Catch ex As Exception
End Try
End Sub
Public Sub WaitClose()
If processForm.InvokeRequired Then
processForm.Invoke(New Action(AddressOf DoCloseJob))
Else
DoCloseJob()
End If
End Sub