teamdad Posted January 7, 2004 Posted January 7, 2004 I have been trying to debug my code to do two things and I need help with it while I am just starting out with vb.net My code below is pretty straight forward, I would like to see by what means I could add code to see if an existing instance of the program I want to bring active exists. If it does exist then it would be activated with focus. If there isn't an instance of it open then a msgbox would pop up with a warning notice to open the needed program or file and retry again. **Would AppActivate or something like Shell ("notepad", vbNormalFocus) be better to use? Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click AppActivate ("Document - Wordpad") Dim blog = TextBox1.Text SendKeys.Send(blog) End Sub Thanking the ones that reply in advance Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.