Re: question on "widow.ew" of Thomas Parslow
- Posted by Greg Haberek <ghaberek at gmail.com> Apr 27, 2005
- 426 views
> posted by: wooseob <wooseoblee at empal.com> > > The codes below is my test on the Thomas's window.e library. In the codes= , > firstly open 'notepad' prog with shellRun func. and then try to close it = with > window_PostCloseMessage procedure... but does'nt work.... > Please let me know anyone what's wrong... [snip from WIN32.HLP: ShellExecute] Return Value If the function succeeds, the return value is the instance handle of the application that was run, or the handle of a dynamic data exchange (DDE) server application. If the function fails, the return value is an error value that is less than or equal to 32. The following table lists these error values: [/snip] As you can see, this is the instance handle of the application, not the handle of the window. It's like calling instance() inside Euphoria. The difference is that you can have an application that does not have any windows, hence it only needs an 'instance' handle. You'll need to obtain the handle of the window in order to close it. Try looking at my 'Monitor All Windows' app in the Archive. You'll probably have to search for the title of the notepad window "Untitled - Notepad" or whatever. ~Greg