Welcome Guest!
 VB Helper Q & A
 Previous Message All Messages Next Message 
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)


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?


Larry R. Holliday
 Previous Message All Messages Next Message 
  Check It Out!

  Topica Channels
 Best of Topica
 Art & Design
 Books, Movies & TV
 Food & Drink
 Health & Fitness
 News & Information
 Personal Finance
 Personal Technology
 Small Business
 Travel & Leisure
 Women & Family

  Start Your Own List!
Email lists are great for debating issues or publishing your views.
Start a List Today!

© 2001 Topica Inc. TFMB
Concerned about privacy? Topica is TrustE certified.
See our Privacy Policy.