Click here to Skip to main content
15,892,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am writing a program that loops through payments. The program is supposed to pause after 12 paymenets have been displayed and then resume when the user either: clicks a button, inputs "n" for next and presses enter, or whatever.

I am using the following code to pause the program:

If PaymentNumber Mod 12 = 0 Then

End If

What I've done in the middle of the If block is to code a MessageBox that asks the user to click Yes to display the next 12 payments. This works but I want to code a Button or a Text box instead of a Message box to accept user input or a click to display the next 12 payments.
I am stuck and can't figure this out.... Any suggestions would be very much appreciated....
Mark
Posted
Comments
wizardzz 7-Dec-10 16:03pm    
Could you post any code? I think that you may not need to pause anything. Just execute a function when a user's input triggers an event. I don't think that would be nested within an If statement.

1 solution

So code up the dialog box that you need, and do this:

C#
MyDialogBox dialog = new MyDialogBox();
if (myDialogBox.DialogResult == OK)
{
   continue;
}
else
{
   break;
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900