How to use one button to do two different actions in Visual Basic 2008 Express Edition?

January 28th, 2010 | by admin |

I’m trying to use a button to start an action and stop the action with the same button, I’m new to Visual Basic and only learning the basic, please explain the codes as well, thanks.

using if condition in button click event, u can control code.

for ex:
in button click event
.
.
.
if text1.text=="form1" then
form2.show
else if text1.text=="form3" then
form3.show

  1. One Response to “How to use one button to do two different actions in Visual Basic 2008 Express Edition?”

  2. By Kumar on Jan 28, 2010 | Reply

    using if condition in button click event, u can control code.

    for ex:
    in button click event
    .
    .
    .
    if text1.text=="form1" then
    form2.show
    else if text1.text=="form3" then
    form3.show
    References :

Post a Comment