Discussion:
VBS INPUTBOX IN MODAL WAY
(too old to reply)
Lorenzo SCHICCHI
2006-11-08 14:07:03 UTC
Permalink
Hi everyone,

I have developed a simple inputbox in vbscript that runs when Win2000
starts. This inputbox acts as an authentication box. I wish that this
inputbox is modal so that I cannot interact with system (e.i. I cannot use
desktop, start button and so on...) until I input a good code.It is
possible?

Thanx in advanced.

Lorschi
mr_unreliable
2006-11-08 18:45:10 UTC
Permalink
hi Lorenzo,

What you are referring to is generally called "System Modal".

There is a discussion about "system modal" with reference to
the messagebox, found here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/dialogboxes/dialogboxreference/dialogboxfunctions/messagebox.asp

However, somewhere (in the transition from 16-bit to 32-bit
windows I believe?), system modal became app modal.

The best thing I can think of is to use the system api (and
maybe even hooking) to check whether the system focus is being
transferred to another app -- then block that -- and then
transfer the system focus back to your own app (dialog).

Needless to say, you won't be able to do this with "pure"
script.

cheers, jw
____________________________________________________________

You got questions? WE GOT ANSWERS!!! ..(but,
no guarantee the answers will be applicable to the questions)
Post by Lorenzo SCHICCHI
Hi everyone,
I have developed a simple inputbox in vbscript that runs when Win2000
starts. This inputbox acts as an authentication box. I wish that this
inputbox is modal so that I cannot interact with system (e.i. I cannot use
desktop, start button and so on...) until I input a good code.It is
possible?
Thanx in advanced.
Lorschi
TDM
2006-11-09 00:03:30 UTC
Permalink
Post by Lorenzo SCHICCHI
Hi everyone,
I have developed a simple inputbox in vbscript that runs when Win2000
starts. This inputbox acts as an authentication box. I wish that this
inputbox is modal so that I cannot interact with system (e.i. I cannot use
desktop, start button and so on...) until I input a good code.It is
possible?
Thanx in advanced.
Lorschi
If you can stand using IE for your InputBox, you might want to play around
with the ShowModalDialog method, maybe work a look.

http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/showmodaldialog.asp


TDM

Loading...