Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
C# Community
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
VB.NET
Windows Forms
editing a config text file with checkboxes
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Nucleus, post: 143615, member: 2990"] Hi, I want to create a Windows form with checkboxes, which will edit the configuration file of apache webserver. That’s a 437 lines text file, which means that each time I want to edit a setting, visual basic will have to find the correct line and make the appropriate modification. I have have this code so far, that opens the file, and after the modifications, saves it. [CODE]Dim f As Integer Dim s As String 'load the whole file into a string variable f = FreeFile() Open "<filename>" For Binary As #f s = Space$(LOF(f)) Get #f, , s Close #f 'do the modifications here 'save the string variable into the file Kill "<filename>" f = FreeFile() Open "<filename>" For Binary As #f Put #f, , s Close #f[/CODE] But I still found no way of actually going to a specific line and making the change. [/QUOTE]
Insert quotes…
Verification
Post reply
VB.NET
Windows Forms
editing a config text file with checkboxes
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top
Bottom