By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,156 Members | 1,071 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,156 IT Pros & Developers. It's quick & easy.

change cursor to an hourglass when a VBscript runs

P: 7
When a vbscript runs, is it possible to change the cursor to an hourglass until the script has completed running? Please reference the following simple script:

(change cursor to hourglass here)
For I = 0 to 1000000
I = I + 1
Next
(change cursor back to default here)
Apr 13 '07 #1
Share this Question
Share on Google+
3 Replies


Expert 5K+
P: 8,434
When a vbscript runs, is it possible to change the cursor to an hourglass until the script has completed running? Please reference the following simple script:

(change cursor to hourglass here)
For I = 0 to 1000000
I = I + 1
Next
(change cursor back to default here)
In VB6, I would set Screen.MousePointer to value vbHourglass before, and value vbDefault afterward.

Don't know whether this will work for you, or not. (Note, in VB6, you might have to use Refresh and/or DoEvents before the change would be visible.)
Apr 13 '07 #2

P: 7
Thanks for the response. However, I put this in a VBScript file but it gives the following error message:

Object required: "Screen"

The file name is "Hourglass.vbs" and has the following code.

Screen.Mousepointer = vbHourglass
for I= 1 to 10000
i = i + 1
next
Screen.Mousepointer = vbDefault
(end of code)



In VB6, I would set Screen.MousePointer to value vbHourglass before, and value vbDefault afterward.

Don't know whether this will work for you, or not. (Note, in VB6, you might have to use Refresh and/or DoEvents before the change would be visible.)
Apr 17 '07 #3

Expert 5K+
P: 8,434
Thanks for the response. However, I put this in a VBScript file but it gives the following error message:

Object required: "Screen"
Oops! I guess this is one of the differences between VB and VBScript. Sorry, I'm not familiar with VBScript. I'd suggest you try the the reference at Microsoft, and do some digging.

It's possible that VBScript simply cannot do what you want, but don't give up without a fight.
Apr 17 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.