Visual Basic (VB) Forms: wait for a user click?
I'm making a simple form that is to step through a program iteratively.
How can I get it to run a method each 开发者_运维技巧time a user clicks a button and wait once it is finished for the next click?
Maybe I'm not understanding your question very well, but is it like the "Next" button on a Wizard? You can have a State variable to store the current "state", so at starup its has the value 1. when click "Next" then do the code for State=1 and then change to State=2 and so on.
Inside you Click event you can have a case statement to proceed according
You want to create a method that gets called when it sees the OnClick
event.
The simplest way to do this is to double-click the button in the GUI Form Designer, and it will go to the code page and start the method for you with the correct syntax.
精彩评论