Opening a notepad file for viewing in ReadOnly mode.

G

Guest

Hi
To open a notepad file, right now I am using Process.start. But this does not ensure that the file is opened in readonly mode

How can I make a notepad file open in Readonly mode

I do not want to change its attributes to Readonly
I do not want to open it in browser or in any other editor except notepad
I do not want to use MFCAppWizard of VC++ or VB to create my own editor.
I do not want to paste the text in some richtextbox control.(I am concerned with size. What if the file is real huge and textbox cannot accomodate it all)

Is there any way to open notepad editor without the menubar and ctrl+s option disabled?(So that User cannot perform Save operation)

Any pointers to how this can be achieved will be very useful. Please reply ASAP. I am working in VB.NET

TIA.
 
T

Tom Shelton

Hi,
To open a notepad file, right now I am using Process.start. But this does not ensure that the file is opened in readonly mode.

How can I make a notepad file open in Readonly mode?

I do not want to change its attributes to Readonly.
I do not want to open it in browser or in any other editor except notepad.
I do not want to use MFCAppWizard of VC++ or VB to create my own editor.
I do not want to paste the text in some richtextbox control.(I am concerned with size. What if the file is real huge and textbox cannot accomodate it all).

Is there any way to open notepad editor without the menubar and ctrl+s option disabled?(So that User cannot perform Save operation).

Any pointers to how this can be achieved will be very useful. Please reply ASAP. I am working in VB.NET.

TIA.

Boy, that's a tall order. Basically, I don't think you can accomplish
what you want (at least not easily) - especially with the restrictions
you've laid down.

Hope you figure something out.
 
S

Schfooge

Suma said:
Hi,
To open a notepad file, right now I am using Process.start. But this does
not ensure that the file is opened in readonly mode.
How can I make a notepad file open in Readonly mode?

I do not want to change its attributes to Readonly.
I do not want to open it in browser or in any other editor except notepad.
I do not want to use MFCAppWizard of VC++ or VB to create my own editor.
I do not want to paste the text in some richtextbox control.(I am
concerned with size. What if the file is real huge and textbox cannot
accomodate it all).
Is there any way to open notepad editor without the menubar and ctrl+s
option disabled?(So that User cannot perform Save operation).
Any pointers to how this can be achieved will be very useful. Please reply ASAP. I am working in VB.NET.

TIA.

I have a suggestion that may work, unless I'm misunderstanding what you're
wanting to do. Instead of worrying whether user can alter your text file,
create a temporary copy of the text file and open that. Thus, the user can
change, save, or do whatever they want to the temp copy without affecting
your "real" copy of the text file.

Hope this helps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top