Go Back   CodingForums.com > :: Computing & Sciences > Computer Programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-18-2012, 07:44 PM   PM User | #1
EdNerd
Regular Coder

 
Join Date: Jan 2010
Posts: 101
Thanks: 8
Thanked 0 Times in 0 Posts
EdNerd is an unknown quantity at this point
VB6: Bring form to top and activate?

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?
Ed
EdNerd is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:15 AM.


Advertisement
Log in to turn off these ads.