c# - Getting the form of a childprocess -


i trying main form of process started, fromchildhandle , fromhandle return null. mainwindowhandle nonzero.

intptr p = process_wrapper.mainwindowhandle; form form = (form) control.fromchildhandle(p); if (form != null) {     form.close(); } 

you can retrieve form control, if form in question has been generated application. cannot retrieve form process, parent process not aware of handle <->control mapping of child process.

if want "stop" child process (form.close() ?) can simple stop complete process. either "clean", or force:

process.closemainwindow() vs process.kill()


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

php - MySQLi multi_query results for later use -