Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How can I set the focus on a window in vbscript

Posted on 2006-05-22
4
Medium Priority
?
316 Views
Last Modified: 2006-11-18
In this case I want to set the focus on a messagebox
0
Comment
Question by:itbabe
  • 4
4 Comments
 
LVL 65

Expert Comment

by:rockiroads
ID: 16733487
something like this perhaps

this example gives focus to a textbox on a form

document.forms("myform").item("text1").focus



0
 
LVL 65

Expert Comment

by:rockiroads
ID: 16733498
Just a thought, when u use

MsgBox to bring up a messagebox in vbscript, dont it normally set focus anyway?
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 16733505
a thought, if u want to force your msgbox to be in the front all the time, how about bringing it up as modal?

MsgBox "I want to be in the Foreground", vbExclamation + vbSystemModal


0
 
LVL 65

Accepted Solution

by:
rockiroads earned 2000 total points
ID: 16733518
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Progress
Starting up a Project

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question