Like you said : It works ! I misunderstood the FileShare .. I thought that was for my access. Thank you very much !
j hannemann
Posts
-
Reading a used file -
Reading a used fileHi Eric. I tried, like you said --- but this results in an error (File.Open returns a FileStream !). He can't convert from FileStream to File .. so I assumed you meant :
FileStream myfile = File.Open(FILE_NAME, FileMode.Open, FileAccess.Read, FileShare.Read);
But this also causes the exception as before. Or did I misunderstood you ? -
Reading a used fileHi. I have a batch-file that creates a logfile. My C# Programm should read this file even if this will still be updated. The (wonderful) editor "Textpad" can easily open that file ... my C# Program can't .. I get 'file is used by another process' Error. I already tried :
FileStream output = new FileStream(FILE_NAME, FileMode.Open, FileAccess.Read, FileShare.Read, 4196, true);
but I still get the error. Can anyone help me PLEASE ?? :confused: -
DirectoryTreeView with CheckBoxesHello there ... Can anyone help me finding a REAL File / Directory TreeView with CheckBoxes like it can be found in (for example) the System Backup Tool of Windows 2000 or maybe like the one in R-Studio ?? I tried to make this with the integrated TreeView and the CheckBoxes but they can't get grey if only some subitems are checked. I am looking for a complete component which is not included in the .NET but somewhere in Win32 :-)) Can anybody help me ? JH
-
Why do my applications need >10 MB RAMHello there. I just want to ask if you got the same. When I start my Applications written in C# .NET and I take a look in the Task Manager, they always use more than 10 MB RAM. They are usual Windows.Forms applications which aren't very complex. The *.exe File is around 50 KB and I compiled it with code optimization on. Can someone tell me if this depends on a foult on my side or is it just because of the .NET Framework ? A little Program should not need so much memory I think ....
-
Again : How to save the TreeViewHello again Thanks leppie for you code but I am not that good to write a load routine for it. This is my first c# project. I've done saving now with another more simple solution. But it works fine. But I just wanted to try a little with
XmlTextReader/Writer
-- and again everytime I want to read the file I got an exception. Saving works perfect ... and the file looks fine... Has somebody any idea what I can do ?? -
Again : How to save the TreeViewHello again. Now I tried the Save and Load routines from the DUMeter project ! They're very good .. and I only gave my FileName and my TreeView-Control as Object and the saving of the file works fine. And it looks like the samples in the help..... But now as I want to load that file again to fill my TreeView I have a nice Exception : An unhandled exception of type 'System.Xml.XmlException' occurred in system.xml.dll Additional information: System error. I have no idea what causes the error. The file isn't in use and was not edited. He stops at the command where he starts reading the file :
System.Xml.XmlTextReader reader = new XmlTextReader(filename); while (reader.Read()) **<-- HERE** { ....
Could someone please again help me in this case ? :confused::confused: -
How to save the TreeView contentHi Jesse. Yes the order and the Tag-Value of each node is needed -- I am able to save it like you say but I would have to store the Tag separately. I thought there must be a more elegant way to save the TreeView. Thatswhy I tried serialization .. but my knowledge of that is no that deep. :( .. Thanks for your help !!
-
How to save the TreeView contentThanks Furty .. I downloaded that project and it looks good. I'll try it ... PS: Your FolderTreeView Project is excellent work I think !
-
How to save the TreeView contentHi there :) I am relative new in C# and I would like to save the content of the TreeView control in my Program. In other languages there I found something like
treeView->SaveToFile
.... or something like that. I tried already a little bit withSerialize
andBinaryFormatter
but it doesn't work at all. Could someone please help me ? :confused: