Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
System.Diagnostics.Process.Start("D:MW2 Stuff\texture mods\Programs and tools\PakScape\PakScape")
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
System.Diagnostics.Process.Start("D:MW2 Stuff\texture mods\Modding folder\HxD")
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
System.Diagnostics.Process.Start("D:MW2 Stuff\texture mods\Modding folder\Adobe_Photoshop_CS5\Adobe Photoshop CS5\Photoshop")
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
System.Diagnostics.Process.Start("D:MW2 Stuff\texture mods\Modding folder")
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
System.Diagnostics.Process.Start("D:MW2 Stuff\texture mods\Modding folder\CRC32 Fixer\CRCFixer")
End Sub
End Class
Public Class Form1
Private Function IsFileInUse(ByVal filepath As String) As Boolean
Try
IO.File.Open((filepath), IO.FileMode.Open, IO.FileAccess.Read, IO.FileShare.None)
Return True
Catch ex As Exception
Return False
End Try
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
System.Diagnostics.Process.Start("D:MW2 Stuff\texture mods\Programs and tools\PakScape\PakScape")
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
System.Diagnostics.Process.Start("D:MW2 Stuff\texture mods\Modding folder\HxD")
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
System.Diagnostics.Process.Start("D:MW2 Stuff\texture mods\Modding folder\Adobe_Photoshop_CS5\Adobe Photoshop CS5\Photoshop")
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
System.Diagnostics.Process.Start("D:MW2 Stuff\texture mods\Modding folder")
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
System.Diagnostics.Process.Start("D:MW2 Stuff\texture mods\Modding folder\CRC32 Fixer\CRCFixer")
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim PathToCheck As String = "D:\MW2 Stuff\texture mods\Programs and tools\PakScape\PakScape"
If IsFileInUse(PathToCheck) Then
TextBox1.Text = "File is currently in use"
Else
TextBox1.Text = "File is not being used at this moment"
End If
End Sub
End Class