BigSi Posted April 10, 2003 Posted April 10, 2003 Hi, Does any one know how to enable the read-only attribute of a file such as a text file or an Access file (eg: c:\myFolder\myTextfile.txt) - I want to be able to control its read only state in vb with a simple button. This should be the same as going into the file properties and ticking the Read-Only box. Your help is greatly appreciated! Quote
BigSi Posted April 10, 2003 Author Posted April 10, 2003 nevermind - I found it :p SetAttr(Filename, FileAttribute.ReadOnly) Quote
Leaders quwiltw Posted April 10, 2003 Leaders Posted April 10, 2003 You should probably use the File class's SetAttributes method instead. System.IO.File Quote --tim
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.