Hello Everyone,
New to VB.NET... Going through a bunch of tutorials currently.
I need help checking if an application is open and then closing it if it is...
For an example, I'll use paint or notepad...
Does something like this work?
Dim myProcess As Process = New Process
myProcess.StartInfo.FileName = "PaintDotNet.exe"
myProcess.Kill()
Or should I go this route:
Private sAppName As String, sAppPath As String
sAppName = "PaintDotNet"
sAppPath = "C:\Program Files\Paint.NET\PaintDotNet.exe"
Shell(sAppPath, vbNormalFocus)
What is the best way to check if an application is open first? Struggling with that portion.
Thank you very much in advance!!!