30-09-12, 06:55 PM
إستبدل الأمر الموجود في Form1 بـ :
كود :
Imports System.Runtime.InteropServices
Public Class Form
Dim Selectd As Integer, Big As Long
Private Const AW_BLEND = &H1
Private Declare Function AnimateWindow Lib "user32" (ByVal hwnd As Int32, ByVal dwTime As Int32, ByVal dwFlags As Int32) As Boolean
Dim winHide As Integer = &H1
Dim winBlend As Integer = &H1
Private Sub Form_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown
Pname.Text = "Wait File Open"
Dim path = Application.StartupPath + "\s.txt"
If (System.IO.File.Exists(path)) Then
Dim Process As Process = Process.Start(path)
Pname.Text = "File Opened"
Me.Hide()
Form1.Show()
Process.[color=#ff0000]WaitForExit[/color]()
Pname.Text = "File Closed"
Form1.Hide()
Me.Show()
Else
Pname.Text = "File Not Found"
End If
End Sub
End Class