get state of a control on quit

  1. how do you get the state of Radio Button when your app quits.
    I will write the state, yes or no to a text file, I know how to do this.

  2. If I can learn how to GET the state of a radio button, I guess I can SET the state of a radio button when the app opens. How do you do that?

thanks for any help.

Check out the .Value property of the radio button. It’s a boolean value.

try doing this in CancelClose for the window
you can tell if the app is quitting as well by checking the parameter

both of these get the bug icon

dim q as RadioButton_autoRecallPW.value
MsgBox(q)

dim q as Boolean
q = Msgbox (RadioButton_autoRecallPW.value)

RadioButton_autoRecallPW.value is a Boolean, but MsgBox expects a String. To convert a Boolean to a String you can use the Str method:

dim q as Boolean = RadioButton_autoRecallPW.value Dim s As String = Str(q) Msgbox (s)

Assuming writing to a Pref file using a binaryStream

//write
dim b As binarystream
b.writeBoolean RadioButton_autoRecallPW.value

//read
RadioButton_autoRecallPW.value = b.readboolean