Thanks!! That was exactly it.. I had opened a stream and forgot to Dispose of it. Cheers!
gubber
Posts
-
File deletion in C# -
File deletion in C#Hi, I'm trying to manipulate files in a C# program, when I delete a file however I run in to problems. It seems the file isn't really deleted until my application exits. I've tried it through File.Delete() and FileInfo.Delete(), and it seems to make no difference. The problem comes when after I have deleted the file I rescan the folder using Directory.GetFiles() and the "deleted" file is still there, except I can't read it. Do I need to somehow flush my file deletion?? Thanks in advance.
-
Handle "send to" sent files from windowsGotcha... I'm being a bit slow! It is friday though. Thanks for your help
-
Handle "send to" sent files from windowsOk sorry, I wasn't very clear. I understand how to make file associations and to put things in the menus. But I don't know how to write the hooks in my code to allow me to process the file I receive.
-
Check box in a Listview column header possible?I don't think it is.. You could either drop a small button on to although that would be rubbish. You could hide the column headers and have the first row of data being a dummy row, when you check its checkbox it checks all the others. -- modified at 9:16 Friday 21st April, 2006
-
Handle "send to" sent files from windowsHi, Does anyone know how I can allow my application to "receive" files either through "Open With.." or "Send To.." from windows explorer. I've been searching but I don't know quite what phrases to search for. Can I also make sure that only one instance of my application is open at a time, and any new files get sent to the already opened instance. I'm coding in C# .NET 2.0 in VS 2005. Thanks for your help.
-
Customizing Tree NodeThanks guys... Because i need my text to be somewhat dynamic I have done a RefreshText() method which will update the Nodes Text property to what it needs to be. I hoped there was a more elegant solution but it appears not. Just means if I add a node I have to go down the tree and refresh all the nodes.. It seems to work. Thanks for your help I'm still trying to get my head around virtual override new and derivation of classes and stuff.
-
Customizing Tree NodeI'm building an application and I'm trying to use my own class which adds a bit extra information to a TreeNode. But even though I override ToString() when they are rendered by the TreeView they seem to use the standard TreeNode.ToString(). I'm guessing this is because when the TreeView iterates the Nodes it contains it treats them as TreeNodes. That would make sense. So the question is what is there a way to override TreeNode.ToString() or get the TreeView to treat the objects as MyTreeNodes rather than ordinary ones.
-
Keeping data in clipboard after app closesHi, I'm trying to get some text that I copy to the clipboard to stay there after my application has closed. At the moment I can paste from clipboard while my application is open, but after it closes the clipboard is empty. Code: **START APPLICATION** Clipboard.SetDataObject("Sample Text"); **CLOSE APPLICATION**
-
Inluding a file in buildI seem to be missing something really obvious. I have an XML file within a c# project that I would like to be included in the output from the build. i.e I want MyApp.exe and MyXMLFile.xml to end up in the Release Folder after I have performed the build. I've set the BuildAction property of the file to Content which I beleived would do the trick. Any help for a stupid problem would be great.