Author |
Topic: Nth Day of Month (Read 705 times) |
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: Nth Day of Month
« Reply #2 on: Sep 5th, 2016, 08:47am » |
|
on Sep 5th, 2016, 07:48am, tsh73 wrote:| LB help says '"Height" in this case refers to the length of the selection list when the combobox's button is clicked'. |
|
The LB Help is wrong - or at least very out-of-date. Before Common Controls version 6.0 (so called 'Windows XP Visual Styles') what it says was true, but since then the height parameter of a combobox has been ignored.
So as long as you are targeting your program to Windows XP or later, and Common Controls v6 are enabled by the program's manifest (which they are in LBB), it is not necessary to set the height parameter to the size of the drop-down box. The comboboxes in Jack's program work fine here in LB 4.04 and LB 4.5.0 (Windows 10).
But the Year 2000 bug is shocking, well spotted. 
Richard.
|
|
Logged
|
|
|
|
joker
Global Moderator
member is offline


Gender: 
Posts: 157
|
 |
Re: Nth Day of Month
« Reply #3 on: Sep 5th, 2016, 09:47am » |
|
on Sep 5th, 2016, 08:47am, Richard Russell wrote:... But the Year 2000 bug is shocking, well spotted. |
|
Too funny, Richard! Wasn't that the year that we were all supposed to be slung off the Earth never to be heard from again? Perhaps I exaggerate a bit?
|
|
Logged
|
|
|
|
Jack Kelly
Full Member
member is offline


Gender: 
Posts: 106
|
 |
Re: Nth Day of Month
« Reply #4 on: Sep 5th, 2016, 11:37am » |
|
I have corrected the issues in the original post, code section. Sorry about the Y2K leap year error. Endless confusion is my normal state-of-mind. Thank you for your feedback. It's always appreciated!
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: Nth Day of Month
« Reply #5 on: Sep 5th, 2016, 12:02pm » |
|
on Sep 5th, 2016, 09:47am, pnlawrence wrote:| Wasn't that the year that we were all supposed to be slung off the Earth never to be heard from again? |
|
In all seriousness this conditional test in Jack's program is surprising:
Code:if yyyy mod 4 = 0 and yyyy<>2000 then It was/is quite fortuitous that 2000 (being a multiple-of-400 year) fitted in with the simple leap-year rule because it meant that programs written carelessly, or with an expectation that they wouldn't still be in use by then, nevertheless worked correctly. But there's no accounting for somebody inserting a special test for 2000, when it wasn't special!
If the test had said year<>2100 it would have been correct, and we would have been congratulating Jack for his optimism!
Richard.
|
|
Logged
|
|
|
|
|