Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX Properties

Status
Not open for further replies.

fpc

IS-IT--Management
Dec 22, 2000
13
US
Can someone tell me how to properly use ActiveX Controls? In particluar, MS Calendar. I place the Calendar on a form or even on a webpage and can click any date and it highlights, fine, but how do you read the date value? If I click the 21st of the month, I would like to display events for that particluar day. How do I read the day value to compare and bring up the appropriate answer? Maybe an ActiveX overview would help but I have tried to find articles regarding this. Any help would be appreciated
FPC
 
Use the name of the control followed by .Value. So if your control is called Calendar1, then you would access the date value it is displaying like this:

SelectedData = Calendar1.Value

You can place code in the Click event of the Calendar control to read a file that contains information about what happened on a specific date. For example if you selected November 5, 1955, you might display the following:

Doctor Emmett Brown, while standing on the toilet hanging a clock, falls and hits his head on the sink. When he comes to, he sees "a vision, a picture in my head of the device that makes time travel possible - the flux capacitor".

:) Snaggs
tribesaddict@swbell.net
 
Lets assume you named the calendar control MSCalendar1 when you have placed the calender on your form double click it. This will ring you to a code window for the default event of the calendar (probably MSCalendar1_Click). Pull down the Right side combo box at the top of the code window. This contains the names of all events available for the calendar. Choose the LostFocus event. There is a property for the calendar that holds the selected date, i dont know what it's named, but if you type the name of the calendar and then a period VB will show you a list of all the properties and methods for the control. Scroll through the list until you find the property for the selected date (maybe SelDate or something, i dont know). When you think youve found it set a date variable equal to it and see what happes. With the drop down lists of properties and methods VB gives you you can use these steps to find out what properties any active-x control supports. Good luck Ruairi
ruairi@logsoftware.com
Experienced with:

VB6, SQL Server, QBASIC, C(unix), MS Office VBA solutions

ALSO: Machine Control/Automation using GE and Omron PLC's and HMI(human machine interface) for industrial applications
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top