Hi all,
I have an application wherein when I selected a particular option ( radio button) and when I close the appliction and restart it, the radio button which I have selected earlier should be made selected.

Iam trying to acheive this for many days, but I couldn't able to.

Iam very thankful , if anybody help me...........

Recommended Answers

All 4 Replies

Hi,

Before closing, You need to save the status of the RadioButton in some place ..
eg: Textfile or some database.
and in formload event of the Form, read the file/database and get the status accordingly..

REgards
Veena

yes, like veena said u need yo save the setting of radio button. i think txtfile is easiest way.

Hi all,
I have an application wherein when I selected a particular option ( radio button) and when I close the appliction and restart it, the radio button which I have selected earlier should be made selected.

Iam trying to acheive this for many days, but I couldn't able to.

Iam very thankful , if anybody help me...........

hi,
set option button to an array if you want and on properties set value=true

mantra

Hi,
Like veena and Jx_Man u can use Text file. Also u can use registry by using GetSetting() and SaveSetting()

Example
Loading value at Startup and Saving Value at the end

Private Sub Form_Load()
   Dim sValue As String
   sValue = GetSetting("MyApplication", "Option", "Value", False)
   Option1.Value = CBool(sValue)
End Sub

Private Sub Form_Unload(Cancel As Integer)
   SaveSetting "MyApplication", "Option", "Value", Option1.Value
End Sub
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.