Hi Everyone,
I'm new to vb.net. I have been trying to learn some vbscript, and I guess its somewhat making sense. I'd rather use vb.net, just cause of the form functionaility, and cause it produces and .exe file which i reallly want..
My question is: What is the best way of opening an closing a application from vb.net?
This is what i'm using to open a txt file in vbscript:
Dim wojbect
Set wobject = CreateObject("WScript.Shell")
wobject.Run "C:\test.txt", 1
and this is what I'm using to close that file:
wobject.Run("taskkill /F /IM notepad.exe /T")
Is this the only way to open and close a application?
another thing I noticed when I use the taskkill command from vbscript, and lets say I close an application that has an icon on the systemtray the icon does not disappear unless I hover my mouse over the icon.
For example lets say i use my process to open up taskmgr.exe twenty and close it twenty times. All the icons will continue to remain on my systemtray until I move my mouse over the icons. Does anyone know how to fix this aswell??
Any help on this would be musch appreciated, thanks in advance.
-Thanks
Sergio
I'm new to vb.net. I have been trying to learn some vbscript, and I guess its somewhat making sense. I'd rather use vb.net, just cause of the form functionaility, and cause it produces and .exe file which i reallly want..
My question is: What is the best way of opening an closing a application from vb.net?
This is what i'm using to open a txt file in vbscript:
Dim wojbect
Set wobject = CreateObject("WScript.Shell")
wobject.Run "C:\test.txt", 1
and this is what I'm using to close that file:
wobject.Run("taskkill /F /IM notepad.exe /T")
Is this the only way to open and close a application?
another thing I noticed when I use the taskkill command from vbscript, and lets say I close an application that has an icon on the systemtray the icon does not disappear unless I hover my mouse over the icon.
For example lets say i use my process to open up taskmgr.exe twenty and close it twenty times. All the icons will continue to remain on my systemtray until I move my mouse over the icons. Does anyone know how to fix this aswell??
Any help on this would be musch appreciated, thanks in advance.
-Thanks
Sergio