Question Changeing buttons

onas

New member
Joined
Jan 22, 2010
Messages
1
Programming Experience
Beginner
how do i get a button to run on bit of code when in one mode and a differnt code when in a never

e.g.

in a temp convert program have the button converting one way then when they click to chage to the other way throgu the menu bar it use the code to convert the ever way
 
You'll simply need to have a variable to hold the conversion setting, then in the button check that var. If it's set to something do the conversion that way, otherwise do it the other way.

Could even set up an enum, then do a select case on the variable to allow multiple different conversion methods be use via a single button.
 
Back
Top