|
RE: Shell Command
|
Phil McCarthy
|
Aug 03, 2001 15:33 PDT
|
You're not refering to this are you??
'closes the window
Dim nameoffile As String
nameoffile = Text1.Text ' or whatever
Dim hWindow As Long
Dim lngResult As Long
Dim lngReturnValue As Long
hWindow = FindWindow(vbNullString, nameoffile)
lngReturnValue = PostMessage(hWindow, WM_CLOSE, vbNull, vbNull)
Phil
Larry Holliday wrote:
| | Using VB6, I successfully executed a Shell command which invoked a DOS
BAT file. The last line in the BAT file was an EXIT command, which I
had hoped would terminate the DOS Window. But it didn't. Even though I
closed the dos window manually, it evidently left some junk somewhere as
I eventually ran into memory problems. I understand that when executing
the Shell command, that a Task ID is returned. Is there anyway of
terminating the task using the value returned? Or other options?
Thanks
Larry R. Holliday
|
|
|
 |
|