Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Thu, 3 Jul 2008 06:37:51 -0700 (PDT),    group: microsoft.public.dotnet.languages.vb        back       


Re: .INI in VB.Net?   
On Jul 2, 6:35 pm, Tommy Long 
wrote:
> I know how to do it in VB6, I have code snippets coming out my ears for VB6,
> but with the new framework in Visual Studio 2005, how do you get/put from a
> .INI
>
> If I attempt to use a VB6 snippet in Studio 05 it whinges about using the
> 'as Any' type in my declarations, and it whinges about using the String$(> function when creating a buffer string variable.  Infact, it whinges a whole
> lot, why my employer got VS05 I'll never know.  :(
>
> Anyway, thanks in advance for any help.
>
> If people have simple alternatives for the use of .ini's for my future
> reference, that'd be handy as well.  Assumably .xl?
>
> Cheers,
> Tommy
>
> --
> -------------------------------
> Please respond to my posts via the newsgroup as the e-mail provided is not
> monitored.

I beleive using My.Settings is much more flexible and easy to maintain
than calling native API calls for INI manipluation.


You know, generally My.Settings are called on form's load event and
saved on form's closing event.

See here:
http://www.devcity.net/Articles/232/1/article.aspx
http://msdn.microsoft.com/en-us/library/ms379611(VS.80).aspx

You can define your variables in application's properties -> settins
page, that'll be saved.
http://msdn.microsoft.com/en-us/library/ms379611(VS.80).aspx

The thing i'd like to fully overcome is that when you move your
application's folder to a different folder(not settings folder or
user.config) , current my.settings get lost.

Also there is a way called "property binding"

Thanks,

Onur
date: Thu, 3 Jul 2008 06:37:51 -0700 (PDT)   author:   kimiraikkonen

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us