Solved

'checked' property in Microsoft datetimepicker control

Posted on 2012-03-14
2
577 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 16

Accepted Solution

by:
HooKooDooKu earned 400 total points
ID: 37721313
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
ID: 37721382
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

751 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