Solved

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

Posted on 2004-10-03
1
254 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

632 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