Avatar of isnoend2001
isnoend2001
Flag 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
Visual Basic Classic

Avatar of undefined
Last Comment
isnoend2001

8/22/2022 - Mon
Martin Liss

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

ASKER
ok
Martin Liss

This shows frmDeferTime within 10 seconds of the Next Reminder becoming "0 Minutes".
28928252.zip
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
isnoend2001

ASKER
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
isnoend2001

ASKER
it would be good if the top rows forecolor was vbred
isnoend2001

ASKER
the deferred time does not count down in the Next Reminder Column
i think it did in the previous version
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Martin Liss

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.
isnoend2001

ASKER
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 Liss

So under what circumstances should the forecolor be red?
Your help has saved me hundreds of hours of internet surfing.
fblack61
isnoend2001

ASKER
Yes the proper row with backcolor white
Martin Liss

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?
isnoend2001

ASKER
it turns red when it is due and stays red. deferred or not
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Martin Liss

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
isnoend2001

ASKER
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 Liss

Please attach your complete project including the dat files renamed to txt files.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
isnoend2001

ASKER
Martin Liss

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
isnoend2001

ASKER
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
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Martin Liss

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.
isnoend2001

ASKER
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
ASKER CERTIFIED SOLUTION
Martin Liss

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
isnoend2001

ASKER
Works good thanks
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck