I'm in the process of upgrading from vb6 to .net and still a little new to it. I've been reading up everywhere i can find on my.settings. Previously I had been using an .ini file. At run time I was able to open that file and modify it if necessary:
The first thing I've been trying to resolve is that the My.settings config file gets stored several levels deep into the users documents dir. Whats the VB code to access that path since its local per user per OS?Code:Dim theiniid As Double ChDir App.Path If Dir("myinifile.ini") <> "" Then theiniid = Shell("Notepad myinifile.ini", vbMaximizedFocus) End If
Secondly since the style type is changing from *.ini to *.xml ive been considering creating a form to show these items instead. XML isn't as clean to look at, a form with a listbox would be much easier on the eyes.
Some code i've found to generate this:
The problem with this batch of code is that item.value doesnt exist, is there a way to access that via this method?Code:For Each item As System.Configuration.SettingsProperty In My.Settings.Properties listbox1.items.additem(item.name) Next
Another thing I've noticed is that during the inital stage of the code I declare
irrigardless the primary form pops up anyways. Anyone know how to stop that?Code:mainform.hide formnumber2.show
Thanks




Reply With Quote