This is rather annoying, but the basic situation is that using the Control.DataBindings() collection is often VERY simple easy and effective. However, there are circumstances that require tweaking.
Case and point: Application Settings via the My.Settings class structure. Now, I have a "Preferences" form which upon the load of my application the first time, it requires the user set certain settings (and will cancel out of the app if
the aren't defined on the first load). All of this works fine, but I have a minor little glitch revolving around the Binding.Parse event and the Binding.WriteValue() method.
Basically, when the Preferences form loads, all the controls that are bound to a My.Settings property, are set to DataSourceUpdateMode.Never. In the Form.Load event, I execute a Control.DataBindings(0).ReadValue() on each of the controls that are bound.
This propagates the form with the appropriate values from the My.Settings Class. Now the user changes/edits/modifies etcetera the values of the controls on the form, and based upon the appropriate values the OK Button will become enabled.
Two of the values are "Folder Locations" but are uniquely formatted in my case, using a "special folder" moniker, for Desktop, or My Documents, etc, etc, etc, so if the user browses for a folder or types one in manually, m
View Complete Post