Solved

How to set the message box retry button to clear a form

Posted on 2004-10-03
1
250 Views
Last Modified: 2010-04-23
Hello experts,

I have a clear button called btnClear defined to clear the controls on my form.

How could I define the the retry button from the message box to call the btnClear in the following statement?

MessageBox.Show("You guessed your BMI incorrectly" & ControlChars.NewLine & "Do you want to re-enter the values", "Guess Results", MessageBoxButtons.RetryCancel)

Thank you for your time
       
0
Comment
Question by:Stella Pauley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 125 total points
ID: 12214057
If MessageBox.Show("You guessed your BMI incorrectly" & ControlChars.NewLine & "Do you want to re-enter the values", "Guess Results", MessageBoxButtons.RetryCancel) = DialogResult.Retry Then
    btnClear_Click(Nothing, Nothing)
End If
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question