ben_josephs wrote:In my installation TextPad always opens with the window size and position of the last TextPad application instance to be closed. Is this not how it behaves in your installation?
Please don't double-post.
I am not double posting but simply put a link to it from the General forum because there may be a Windows programmer who knows the solution but may not go to the Java forum.
-----
From Peter who wrote ShellExec at
http://www.heimetli.ch
"According to Microsoft, it is possible:
http://msdn.microsoft.com/library/defau ... rocess.asp
(Look at the parameter lpStartupInfo)
Regards
P. Tellenbach"
-----
From Tim Kingbury:
"That's a tricky one. I'm not sure of a good way to do
it from Java. The best answer that I have is that you will need to use JNI to call the underlying Win32 function "CreateProcess()" which gives you
extensive options for controlling the appearance of the new application's
window. Actually doing this from Java would be a bit tricky because you would have to map a number of C structs into the Java environment.
Your easiest bet is to build a very small C application to do the actual
work, and call that from Java using Runtime.exec()."
----
Actually, I am wondering if the best and simplest solution is to follow up on your point - simply have the user open the program eg. textpad and resize the window to a smaller size, and then exit.
Thereafter when my application runs, it will bring up the program (textpad) in the new resized window.
thanks,
Anil