I have a windows application that will write some information to Track1 and Track2 of a card. Now what I would like to accomplish is that when the user clicks the button a messagebox appear saying “Waiting For Swipe” once user swipes the card for the messagebox to disappear.
I tried to use a do while loop however it will not see my function that I am calling
for example:
do{
readcard();
}while (messagebox.show());
this did not work at all. Any suggestions on how I could accomplish this.
Thanks
MessageBox.Showshows a messagebox and waits for the user to dismiss it.if you want to display something that doesn’t wait for the user, but is controlled programmatically, you need to write it yourself. In Windows Forms, you’d create a
Form, perhaps with the winforms designer, callShowon an instance to show it, thenHideto hide it afterwardsHowever, windows applications and any applications written in the last… 10 or 20 years… are event-driven and so you if the user is involved you shouldn’t use loops like that (with the
while).Check out:
http://en.wikipedia.org/wiki/Event-driven_programming
http://dotnetfirez.blogspot.com/2010/05/winforms.html
https://softwareengineering.stackexchange.com/questions/99842/vs2010-winform-designer-to-learn-or-bottom-up-approach
and Google for a starting point.