Is it possible to link a process (i.e. osk.exe) opened by a program so it dies when calling program dies?
So, I start my application, it starts OSK.EXE, and if the program crashes, the on-screen keyboard is still there. Possible to link the two so that the process dies when the application dies?
rciprogrammer -2 Light Poster
Recommended Answers
Jump to Post— adam_k 239You can try USING, but if your program crashes due to StackOverflowException it won't do you any good. Read here for details: http://msdn.microsoft.com/en-us/library/htd05whh(v=vs.80).aspx
Jump to Post— codeorder 197See if this helps.
1 TimerPublic Class Form1 Private myRunningProcesses() As Process Private myAPPthatCrashes As String = "notepad", myKeyboardApp As String = "calc", bAppFound As Boolean Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load With Timer1 .Interval = 1000 '// 1 sec. .Start() End With …
Jump to Post— adam_k 239codeorder, your code is for a background app or a service or something like that.
Something like this would never allow the Calculator in your example to run - for more than 1 sec - as a standalone app.
The problem is how to close the Calculator when the program …
All 10 Replies
adam_k 239 Master Poster
codeorder 197 Nearly a Posting Virtuoso
Member #857553 commented: "Just Because" :) -2
adam_k 239 Master Poster
rciprogrammer -2 Light Poster
Member #857553
rciprogrammer -2 Light Poster
Member #857553
codeorder commented: Also "Just Because". :D -2
rciprogrammer -2 Light Poster
rciprogrammer -2 Light Poster
Reverend Jim 6,681 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.