I'm self-taught in VB macros in Word and Excel, and I dabble a bit in VB6 (Classic, not NET). I'm not at all up on APIs, relying on slurping from the internet.
I have a one-form program that works fine. I use it at church to pull up songs. I can type in the name or the first line of a song, and it searches a folder and pulls up the song as Word doc. At that point, the form is resized to about height of a Title bar and about 2" wide.
After opening the Word doc, I can use Me.SetFocus and Me.Text1.SetFocus to bring the form back on top and deactivate the Word window. This does two things: it allows me to close the Word doc by simply typing a 0, and it keeps me from accidentally typing in the doc.
But if the mouse gets clicked and the Word doc gets the focus, I'm kinda dead! I can get the form window on top of the Word window, but I can't make the form or VB the active application. I've got a timer in the form that keeps checking to see if there's an active Word doc object (just in case the doc gets accidentally closed); if not, it restores the form to full size. I'm trying to get it so if there is a doc object, then ensure VB and the form are on top and active.
Any help with this?