Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stop software on w2k
Message
From
18/11/2002 05:27:32
 
 
To
13/11/2002 07:20:51
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00722030
Message ID:
00723769
Views:
11
Hi Kouakou,

I can't remember where I found it, but this works on XP.
I have checked and the process is removed from the list of running tasks.
But you have to know the text that appears in the title bar.

Alan

* Get handle for the window to be closed.
DECLARE INTEGER FindWindow IN Win32API;
STRING @lpClassName, STRING @lpWindowName
* Passing 0 as the class name causes all classes to
* match. The title text must match exactly and is
* case sensitive.
* lctitletext is the title bar text to search for
lnhWnd = FindWindow(0, @lctitletext)
* lnhWnd will be greater than 0 if a match is found.

* Use SendMessage to #DEFINE WM_DESTROY 0x0002
#DEFINE WM_CLOSE 0x0010
DECLARE INTEGER SendMessage IN Win32API;
INTEGER hwnd, INTEGER uMsg,:
INTEGER wParam, INTEGER lParam
* lnhWnd is the Window handle to close
* Close and allow prompt to save changes
= SendMessage(lnhWnd, WM_CLOSE, 0, 0)
* Close without allowing prompt
= SendMessage(lnhWnd, WM_DESTROY, 0, 0)
Previous
Reply
Map
View

Click here to load this message in the networking platform