How to create confirmation dialog box with delay OK button?

I'm developing windows forms application in
I must allow users to delete some records from database but I want to make it really unpleasant :)
So there must be confirmation dialog box with two buttons.
One of them will be OK and the other one will be Cancel ( I decide which is which based on Random number generator :) )
But I want to enable OK button after few seconds for example 5 seconds during this time there will be
OK (5), OK (4) , OK(3) , OK(2), OK(1), OK and now OK button is enabled.
I know how to do this using form and 2 buttons and Timer object.
But how I can return the result (true or false) to the main form?

I want to do something like MsgBox
Please help me with this problem
Best Regards
LVL 11
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You can use a Timer from (eg the system.threading) class which updates every x seconds the text of the button.
f_o_o_k_yAuthor Commented:
Maybe I didn't ask question to creally.

I know how to do everything (buttons, cuntdown, random position of OK button) except one thing.

How can I get in main form value from this confirmation form.

Example belowe shows what I want to do but it's with MsgBox .
I need to do this but instead using MsgBox I want to use my frmConfirm.vb
Best Regards
' frmMain.vb
Dim answer As MsgBoxResult
answer = MsgBox("Are you sure?", MsgBoxStyle.YesNo, "Warning!")
If answer = MsgBoxResult.Yes Then
End If

Open in new window

f_o_o_k_yAuthor Commented:
Solution is to set dialogresult property just before closing form.
and in main form use showDialog() instead of show()

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.