Link to home
Create AccountLog in
Avatar of isnoend2001
isnoend2001Flag for United States of America

asked on

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

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
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

I'm going to try to show frmDeferTime immediately after the time is zero.
Avatar of isnoend2001

ASKER

ok
This shows frmDeferTime within 10 seconds of the Next Reminder becoming "0 Minutes".
28928252.zip
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
User generated image
it would be good if the top rows forecolor was vbred
the deferred time does not count down in the Next Reminder Column
i think it did in the previous version
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.
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
So under what circumstances should the forecolor be red?
Yes the proper row with backcolor white
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?
it turns red when it is due and stays red. deferred or not
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
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
User generated image
Please attach your complete project including the dat files renamed to txt files.
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
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
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.
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
User generated image
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Works good thanks