Solved

'checked' property in Microsoft datetimepicker control

Posted on 2012-03-14
2
568 Views
Last Modified: 2012-03-14
I'm trying to include the Microsoft datetimepicker control into a Visual FoxPro form.
I need to be able to include a checkbox into the control, for those occasions when there won't be a date.

I can get the ActiveX control onto the form.

When I come to the properties list, I have an entry for the .CHECKBOX property, which is set to .F. by default. But I can't change this on the PEM list to .T. - am I doing something wrong here?

However, I have found that, within the .INIT() method I can do
    .CHECKBOX = .T.
and the checkbox will appear.

But the most annoying thing is when I'm storing the contents from the control. I'd like to be able to read the state of the checkbox, which I think I ought to be able to do using the .CHECKED property. But (a) that doesn't appear on the PEM list and (b) if I try referring to it programmatically, then I get an error messsage that indicates that .CHECKED doesn't exist.

Any suggestions?
0
Comment
Question by:IainMacb
2 Comments
 
LVL 16

Accepted Solution

by:
HooKooDooKu earned 400 total points
Comment Utility
The Microsoft Date/Time picker for C++ in Visual Studio 2010 has no 'Checked' property.  So perhaps that isn't really a property.

But then a checkbox is a pretty simple strait forward control.  What about simply adding your own check box as a 2nd control.  Then you could modify the datetime picker based on the status of the checkbox and you wouldn't have any limits placed on you by the datetime picker.
0
 
LVL 1

Author Closing Comment

by:IainMacb
Comment Utility
The perils of Google - I'd ended up with Microsoft's description of the DateTimePicker, at http://http://msdn.microsoft.com/en-us/library/system.windows.forms.datetimepicker.checked%28v=vs.80%29.aspx, which does have a .CHECKED property.

The idea of having a separate checkbox was one that had occurred to me, and which I'd started doing before I got waylaid by the wrong documentation!
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now