Welcome to Scripting Forums Sign in | Join | Help
in Search

HTA Calendar Control (another example)

Last post 04-17-2008, 3:28 PM by jturnervbs. 0 replies.
Sort Posts: Previous Next
  •  04-17-2008, 3:28 PM 29555

    HTA Calendar Control (another example)

    Here's an ActiveX Calendar Control example that you can use within an HTA.  It demonstrates how to display a Calendar and return a selected date.

    Simply copy the code into a text file and name it with an HTA extension.

     Enjoy.

    <HTML>
    <HEAD>
    <TITLE>Show Date Calendar</TITLE>
    <HTA:APPLICATION
         ID="HTACalendarControl"
         APPLICATIONNAME="HTACalCtrl"
         SCROLL="no"
         SINGLEINSTANCE="no"
         WINDOWSTATE="normal"
    >
    <SCRIPT type="text/VBScript">
    Sub Window_Onload
     self.ResizeTo 350,300 'w,h
     self.MoveTo 1,1
    End Sub
    Sub ShowDate
     DateVal = Calendar1.Value
     MsgBox DateVal
    End Sub
    </SCRIPT>
    </HEAD>
    <body STYLE="filter:progid:DXImageTransform.Microsoft.Gradient
    (GradientType=1, StartColorStr='#0000AA', EndColorStr='#000055')">
    <p align="center">
    <OBJECT CLASSID="clsid:8E27C92B-1264-101C-8A2F-040224009C02" id="Calendar1"></OBJECT></p>
    <p align="center">
    <input type="button" name="OKButton" value="Show Date" onclick="ShowDate">&nbsp;&nbsp;&nbsp;
    </p>
    </BODY>
    </HTML>

View as RSS news feed in XML
SPONSORED LINKS FEATURED LINKS

Interested in Email Encryption? Read about the advantages of identity-based encryption in this free report. Order Your SQL Fundamentals CD Today! Learn how to use SQL Server, understand Office integration techniques and dive into the essentials of SQL Express and Visual Basic with this free SQL Fundamentals CD. Virtualization Congress Oct. 14-16 in London Don't miss Virtualization Congress, the premiere EMEA conference dedicated to hardware, OS and application virtualization. Oct. 14-16. IT ConnectionsDive into the new Microsoft platforms and products you implement and support with the experts from Microsoft, TechNet Magazine, Windows ITPro and industry gurus. There are 70+ sessions and interactive panels with networking opportunities. Attention User Group Leaders...Announcing the eNews Generator—a FREE HTML e-newsletter builder for user group leaders. Build your HTML and text e-newsletters in minutes and add Windows IT Pro & SQL Server Mag articles alongside your own message!. Master SharePoint with 3 eLearning SeminarsLearn how to build a better SharePoint infrastructure and enable powerful collaboration with MVPs Dan Holme and Michael Noel. Register today! Get SQL Server 2008 at WinConnectionsDon’t miss Microsoft Exchange and Windows Connections conferences, the premier events for Microsoft IT Professionals in Las Vegas, November 10-13. Every attendee will receive a copy of SQL Server 2008 Standard Edition with one CAL.

 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing