i have a vb reminder program that opens a form when time is due using vb6

isnoend2001
isnoend2001 used Ask the Experts™
on
the due time is in a msflexgrid
a timer updates the time every 10 seconds
the reminder stays at 0 Minutes for a minute.
How can i make the form open as soon as the time gets to 0 minutes or
have it count down
50 Seconds
40 seconds
etc ?
28928163.zip
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Martin LissOlder than dirt
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
I'm going to try to show frmDeferTime immediately after the time is zero.

Author

Commented:
ok
Martin LissOlder than dirt
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
This shows frmDeferTime within 10 seconds of the Next Reminder becoming "0 Minutes".
28928252.zip
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
It seems to show the for faster, i deferred it 15 minutes and the wrong row is highlighted
if fact no row should be light red
grid

Author

Commented:
it would be good if the top rows forecolor was vbred

Author

Commented:
the deferred time does not count down in the Next Reminder Column
i think it did in the previous version
Martin LissOlder than dirt
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
You say two conflicting things.
if fact no row should be light red
it would be good if the top rows forecolor was vbred
Which way do you want it?

Also in another thread you told me that once something was 0 minutes that it shouldn't change and I believe that's why it doesn't count down when it's deferred.

Author

Commented:
Which way do you want it?
forcolor red, not backcolor, the backcolor was for deleting a reminder
shouldn't change and I believe that's why it doesn't count down when it's deferred.
In the other thread After it got to 0 it would switch to the next day. this should not happen on a one time AMPM
Martin LissOlder than dirt
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
So under what circumstances should the forecolor be red?

Author

Commented:
Yes the proper row with backcolor white
Martin LissOlder than dirt
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
That doesn't answer my question so let me put it another way. When should the grid forecolor of a reminder become red? When it is deferred?

Author

Commented:
it turns red when it is due and stays red. deferred or not
Martin LissOlder than dirt
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
Here's a new version. Changes include
Make frmDeferTime appear immediatly after Next Reminder becomes "0 Minutes"
When a reminder is deferred, make the ForeColor red
When a reminder is deferred, count down Next Reminder from the deferred to  (Delay) time
When the user chooses Delete from frmDeferTime, make the backcolor of the row light red

Note that in the 28928163.zip file that you uploaded in this thread that you have three Options folders: the first under the FactsFolder folder, the second under the Personal folder and the third under the Tasks folder. The program looks for the one under the Tasks folder so in this zip file I've deleted the other two.
28928252a.zip

Author

Commented:
Something is wrong
i made a new 5 minute reminder as soon as it counted down to 0 minutes it displays the defer form
ok so far
but then when deferring the time 5 minutes the wrong row is red text
and the 5 minute defer time does not count down
I think a better way is to color the row as soon as it hits 0 color the row, instead of when defer is clicked
delay
Martin LissOlder than dirt
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
Please attach your complete project including the dat files renamed to txt files.
Martin LissOlder than dirt
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
When you color a row you need to specifically set the .Row property of the grid and I had forgotten to do that.
28928252b.zip

Author

Commented:
Still has the same problem
I think the red text should be set when the time gets to 0, before frmDeferTime is shown Rather than when the defer is set
Martin LissOlder than dirt
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
Here is what I did to reproduce the problem you reported earlier.
I created a onetime time reminder for 6 minutes in the future.
While it was approaching its due time I Viewed another reminder
When frmDeferTime showed up I selected 5 minutes and when I did that the reminder that I Viewed became red rather than the one time reminder.

I added code to fix that and did the same thing and it worked as it should so you need to tell me exactly the steps that led to the problem when you ran it using my new code.

Author

Commented:
I think if you delay the defer for a few seconds the sort  moves the row. still the row should be red before
the defer form is shown.
see if you delay deferring the reminder if once frmdeferTime is shown you get the problem
defer time
Older than dirt
Most Valuable Expert 2017
Distinguished Expert 2018
Commented:
One more time.
28928252c.zip

Author

Commented:
Works good thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial