• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 319
  • Last Modified:

How can I set the focus on a window in vbscript

In this case I want to set the focus on a messagebox
0
itbabe
Asked:
itbabe
  • 4
1 Solution
 
rockiroadsCommented:
something like this perhaps

this example gives focus to a textbox on a form

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



0
 
rockiroadsCommented:
Just a thought, when u use

MsgBox to bring up a messagebox in vbscript, dont it normally set focus anyway?
0
 
rockiroadsCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now