Closing a program automatically with VB ?? 
Author Message
 Closing a program automatically with VB ??

Hello everyone,

I'm a newbie and I'd like VBA 6 to close a program automatically, to copy
some
files and to restart it.

Can you give me a clue ??

I use Windows 98

Thanks.



Fri, 10 Aug 2001 03:00:00 GMT  
 Closing a program automatically with VB ??
You can post the WM_CLOSE - message to the window.

'Functie naam: PostMessage
'Library: User
'API-Guide
'KPD-Team 1998
'Kris & Pieter Philippaerts

'URL: http://users.turboline.be/btl10148/

Const WM_CLOSE = &H10
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA"
(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As
Any) As Long

    PostMessage WinWnd, WM_CLOSE, 0&, 0&

HTH,
Pieter Philippaerts
http://users.turboline.be/btl10148/


Quote:
>Hello everyone,

>I'm a newbie and I'd like VBA 6 to close a program automatically, to copy
>some
>files and to restart it.

>Can you give me a clue ??

>I use Windows 98

>Thanks.



Sat, 11 Aug 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Closing automatically another program ???

2. wait and close shell program automatically...

3. Closing a program automatically and copying files ???

4. Automatically closing down Access using code after a Modal window has been closed

5. How to close VB 4.0 16 bit program when a Crystal report Window is closed

6. Install VB program automatically with Autorun

7. How to make a VB program PING automatically

8. I need to automatically load and run a VB program from windows

9. Is there a way to close outlook automatically??

10. automatically open or close a corrupt file

11. Form automatically close after clicking Apply button

12. Windows Forms Closes Automatically.

 

 
Powered by phpBB® Forum Software