Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need function to find Monday by Week No
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01052733
Message ID:
01053039
Views:
11
Dmitry,

As you are building the labels on the form you only need to determine the first Monday for the first label. If you use a custom label class you can give it a custom property to hold the date value:
this.dThisMonday = ...
Then you code can simply reference this stored date property without having to calculate it each time.

After you have the first you can just simply add 7 days to the date to get the next date.

>Here is what I need to use this function for. I have 52 labels on a form, each one has Caption with number corresponding to the week number. I want the user to be able to click on any label and in Mouse Up method I would display (in WAIT) the calendar date corresponding to the Monday of the clicked week number.
>
>I wanted the speed because (I think) that the user will be frustrated if they have to wait (even 2 seconds) after clicking on the label. So far, in my tests, on my PC, it seems to be very fast, not even a second.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform