Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can i use vbscript to create a windows form?

7,784 views
Skip to first unread message

ncowboy

unread,
Dec 5, 2007, 8:49:54 AM12/5/07
to
Can i use vbscript to create a windows form which includes some
checkboxes,textboxes and buttones?

mayayana

unread,
Dec 5, 2007, 9:28:01 AM12/5/07
to
> Can i use vbscript to create a windows form which includes some
> checkboxes,textboxes and buttones?

There's nothing built into script or the WSH.
You can use a 3rd-party control if you want to,
or you can do a fairly good job using IE if you're
dealing with IE5/6. (IE7 has problems.)

Here are a few options:

A basic window that can be controlled from script:
www.jsware.net/jsware/scripts.php3#jsform

A drawing component that has an optional
blank form. The functionality is limited, but
the creative options are extensive. You can,
for instance, "skin" the form with an image and
draw buttons over hotspots. But there's no
checkbox, listbox, etc.
www.jsware.net/jsware/scripts.php3#draw

Custom message boxes created using an IE
window from script. They look nearly identical
to the system message box and can have
anything a webpage can have. The download
is a class you can paste into a script to get
a listbox, buttons, etc. The class can be modified
to get checkboxes. (Doesn't work so well in
IE7 because the "chrome" frame of the IE
window cannot be removed.)
www.jsware.net/jsware/scripts.php3#msgb

McKirahan

unread,
Dec 5, 2007, 9:36:11 AM12/5/07
to
"ncowboy" <nco...@gmail.com> wrote in message
news:42a435a9-c811-4950...@d21g2000prf.googlegroups.com...

> Can i use vbscript to create a windows form which includes some
> checkboxes,textboxes and buttones?

Yes -- it's called an HTA (HTML Application).

Create a Web page but use the extension "hta" not ".htm".
Then add all the VBScript you want between
<script type="text/vbscript"> and </script>

Google "HTML Application" for more information.

HTML Application
http://en.wikipedia.org/wiki/HTML_Application

"From Wikipedia, the free encyclopedia

An HTML Application (HTA) is a Microsoft Windows application
written with HTML and Dynamic HTML. The ability to write HTAs
was introduced with Microsoft Internet Explorer 4.0.

HTAs can be made from regular HTML files by simply changing the
file extension to .hta. An HTA runs as a fully trusted application and
therefore has more privileges than a regular HTML file, which is
confined to the security model of the web browser."

Introduction to HTML Applications (HTAs)
http://msdn2.microsoft.com/en-us/library/ms536496.aspx

The Hey, Scripting Guy! Archive: HTML Application (HTAs)
http://www.microsoft.com/technet/scriptcenter/resources/qanda/htas.mspx


Jeffery Hicks [MVP]

unread,
Dec 5, 2007, 11:42:17 AM12/5/07
to
There is an entire chapter on creating HTAs in Advanced VBScript for Windows
Administrators (Microsoft Press). You can find some HTAs in the Script
Vault at ScriptingAnswers.com as well.

--
Jeffery Hicks
Microsoft PowerShell MVP
http://www.scriptinganswers.com
http://www.powershellcommunity.org

Now Available: WSH and VBScript Core: TFM
Coming Soon: Windows PowerShell: TFM 2nd Ed.

"McKirahan" <Ne...@McKirahan.com> wrote in message
news:kMadnXe8mv6kKsva...@comcast.com...

Paul Randall

unread,
Dec 5, 2007, 5:13:16 PM12/5/07
to

"ncowboy" <nco...@gmail.com> wrote in message
news:42a435a9-c811-4950...@d21g2000prf.googlegroups.com...
> Can i use vbscript to create a windows form which includes some
> checkboxes,textboxes and buttones?

Hi, ncowboy

Go here for some helpful links:
http://www.robvanderwoude.com/codegen.html

I would expecially recommend HTA Helpomatic and HTA Generator. What I
like best about HTA Helpomatic is that it is an example HTA that
contains select boxes, checkboxes, etc (so you can see how to code
them), and it also uses VBScript to create the code for them, so you
can mostly just cut and paste to build what you want.

-Paul Randall


0 new messages