30-09-12, 08:41 PM
Osama_Ghareeb كتب :كود :
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim Processes As Process() = Process.GetProcessesByName("notepad")
If Processes.Count > 1 Then
For Each Process In Processes
If Process.MainWindowTitle.StartsWith("s.txt") Then
Pname.Text = "File Opened"
Me.Hide()
Form1.Show()
Process.WaitForExit()
Pname.Text = "File Closed"
Form1.Hide()
Me.Show()
Exit For
End If
Next
End If
End Sub
جزاك الله كل خير وى حماك الله من كل شر
