Click here to Skip to main content
15,893,594 members
Home / Discussions / C#
   

C#

 
Questionvery simple question: what is the purpose of & in "" Pin
dino20948-Mar-07 22:00
dino20948-Mar-07 22:00 
AnswerRe: very simple question: what is the purpose of & in "" Pin
Stefan Troschuetz8-Mar-07 22:12
Stefan Troschuetz8-Mar-07 22:12 
AnswerRe: very simple question: what is the purpose of & in "" Pin
stancrm8-Mar-07 22:13
stancrm8-Mar-07 22:13 
QuestionUsercontrol and focus? Pin
Snowjim8-Mar-07 21:43
Snowjim8-Mar-07 21:43 
QuestionSystem.Net.Mail Problem... [modified] Pin
Jijo BP8-Mar-07 21:32
Jijo BP8-Mar-07 21:32 
AnswerRe: System.Net.Mail Problem... Pin
saeee8-Mar-07 23:39
saeee8-Mar-07 23:39 
GeneralRe: System.Net.Mail Problem... Pin
Jijo BP9-Mar-07 0:10
Jijo BP9-Mar-07 0:10 
AnswerWhy the open file handle ? [modified] Pin
Radu Sorin8-Mar-07 20:52
Radu Sorin8-Mar-07 20:52 
I am writing an simple application that will delete a file/directory. The application recives the target file as an argument. I have also put a shortcut in the W Explorer contextual menu, via Shell registry subkey of the folder entry
in the HKEY_CLASSES_ROOT.

[HKEY_CLASSES_ROOT\Folder\shell\NewMenuOption]
@="Wipe it ..."

[HKEY_CLASSES_ROOT\Folder\shell\NewMenuOption\command]
@="D:\\FileWiper\\bin\\Debug\\FileWiper.exe \"%1\""
If a launch the program from a shell with an filename/folder as an argument it does it's job.
But if the program is launched via the option in the Explorer menu and the selected targer is a folder (with a simple file it works), then the deleting fails with the exception " ... file being used by another process". It seems that the program keeps an open handle on the directory. The delete operation is made via Directory.Delete() ( tried also working with DirectoryInfo ...same result).

Any one has any idea how can I get past this ?

------------------------------------------------------------------
LATER EDIT : I managed to track the problem after all. Simple stuff really, but forgot about it. Windows set the current directory for the program was set to be the target directory, so a simple change of the current directory was enough to get the program going.


-- modified at 4:04 Friday 9th March, 2007
QuestionIE not showing popups Pin
RanjithLogics8-Mar-07 19:46
RanjithLogics8-Mar-07 19:46 
AnswerRe: IE not showing popups Pin
\laddie9-Mar-07 0:01
\laddie9-Mar-07 0:01 
GeneralRe: IE not showing popups Pin
RanjithLogics9-Mar-07 0:45
RanjithLogics9-Mar-07 0:45 
AnswerRe: IE not showing popups Pin
srivatsan249-Mar-07 10:57
srivatsan249-Mar-07 10:57 
QuestionTCP Socket Listening Pin
Member 36814438-Mar-07 19:06
Member 36814438-Mar-07 19:06 
AnswerRe: TCP Socket Listening Pin
stancrm8-Mar-07 19:29
stancrm8-Mar-07 19:29 
AnswerRe: Regarding active directory in Dot net Pin
\laddie8-Mar-07 18:59
\laddie8-Mar-07 18:59 
QuestionGet Number of users Pin
Rahul.RK8-Mar-07 18:30
Rahul.RK8-Mar-07 18:30 
AnswerRe: Get Number of users Pin
\laddie8-Mar-07 18:43
\laddie8-Mar-07 18:43 
GeneralRe: Get Number of users Pin
Rahul.RK8-Mar-07 19:27
Rahul.RK8-Mar-07 19:27 
GeneralRe: Get Number of users Pin
\laddie8-Mar-07 19:43
\laddie8-Mar-07 19:43 
QuestionWindows form question. Pin
NanaAM8-Mar-07 18:15
NanaAM8-Mar-07 18:15 
AnswerRe: Windows form question. Pin
\laddie8-Mar-07 18:36
\laddie8-Mar-07 18:36 
GeneralRe: Windows form question. Pin
NanaAM8-Mar-07 19:00
NanaAM8-Mar-07 19:00 
QuestionNumbers in a Multilingual website Pin
Member 28466208-Mar-07 18:11
Member 28466208-Mar-07 18:11 
AnswerRe: Numbers in a Multilingual website Pin
Hayder Marzouk8-Mar-07 21:31
Hayder Marzouk8-Mar-07 21:31 
QuestionHow to retrive values into DataGridView From a XMLFile using c#.net2.0 Pin
pashitech8-Mar-07 18:03
pashitech8-Mar-07 18:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.