vb.net - how to know form2 of other application is running -


my question originates here:

how know 1 application application has active form. same machine (windows) running 2 application (a.exe , b.exe) both created in vb.net. how can a.exe know b.exe form2 open or not?

i know b.exe running via:

public function isapplicationrunning(byval appname string) process    each aprocess in process.getprocesses()          if aprocess.processname.startswith(appname, stringcomparisong.currentcultureignorecase)          return aprocess         end if    next    return nothing end function 

there no direct way , form2 needs expose can used identify (e.g. title).

you have process handle. then, check every window of process. if find window matches, specified form open. however, there no guarantee because window looks similar (but based on class).


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -