Click here to Skip to main content
15,888,065 members
Home / Discussions / C#
   

C#

 
AnswerRe: Message Box Pin
InOut.NET31-May-06 23:05
InOut.NET31-May-06 23:05 
AnswerRe: Message Box Pin
LongRange.Shooter1-Jun-06 9:32
LongRange.Shooter1-Jun-06 9:32 
QuestionWindows ding on textbox Pin
InOut.NET31-May-06 21:59
InOut.NET31-May-06 21:59 
AnswerRe: Windows ding on textbox Pin
Mairaaj Khan31-May-06 23:57
professionalMairaaj Khan31-May-06 23:57 
GeneralRe: Windows ding on textbox Pin
InOut.NET1-Jun-06 0:06
InOut.NET1-Jun-06 0:06 
AnswerRe: Windows ding on textbox Pin
Christian Wulff1-Jun-06 0:57
Christian Wulff1-Jun-06 0:57 
GeneralRe: Windows ding on textbox Pin
InOut.NET1-Jun-06 21:33
InOut.NET1-Jun-06 21:33 
QuestionCopy or read locked/in use files Pin
nemopeti31-May-06 21:15
nemopeti31-May-06 21:15 
Hi for all!

I have some problem, while try to read and copy locked or files witch in use.
I try this method, witch work for some file, but the others not D'Oh! | :doh:

my way:
<br />
FileStream fs = null;<br />
<br />
                        try<br />
                        {<br />
                            try<br />
                            {<br />
                                fs = File.OpenRead(file);<br />
                            }<br />
                            catch<br />
                            {<br />
                                fs = File.Open(file, FileMode.Open, FileAccess.Read, FileShare.Read);<br />
                            }<br />
                        }<br />
                        catch<br />
                        {<br />
                            try<br />
                            {<br />
                                string NewFile=File+"_";<br />
                                Fi.CopyTo(NewFile, true);<br />
                                    }<br />
                                    catch<br />
                                    {<br />
                                        try<br />
                                        {<br />
                                            File.Copy(file, NewFile, true);<br />
                                        }<br />
                                        catch<br />
                                        {<br />
                                        }<br />
                                    }<br />
                                }                                <br />
                            }<br />
                            catch (Exception e)<br />
                            {<br />
                                MessageBox.Show("Grrrrrr: "+e.Message);<br />
                            }<br />


I miss somethink, or I need a nother way to figure out windows file locking system.

I wait for any ideas....

Thank's for help.
AnswerRe: Copy or read locked/in use files Pin
stancrm31-May-06 21:30
stancrm31-May-06 21:30 
GeneralRe: Copy or read locked/in use files Pin
nemopeti31-May-06 21:34
nemopeti31-May-06 21:34 
GeneralRe: Copy or read locked/in use files Pin
stancrm31-May-06 21:50
stancrm31-May-06 21:50 
GeneralRe: Copy or read locked/in use files Pin
nemopeti31-May-06 23:41
nemopeti31-May-06 23:41 
GeneralRe: Copy or read locked/in use files Pin
stancrm31-May-06 23:47
stancrm31-May-06 23:47 
GeneralRe: Copy or read locked/in use files Pin
nemopeti31-May-06 23:54
nemopeti31-May-06 23:54 
QuestionIs it a correct way Pin
engsrini31-May-06 20:43
engsrini31-May-06 20:43 
AnswerRe: Is it a correct way Pin
BadKarma31-May-06 21:33
BadKarma31-May-06 21:33 
AnswerRe: Is it a correct way Pin
InOut.NET31-May-06 21:57
InOut.NET31-May-06 21:57 
Questioncombobox Pin
kjosh31-May-06 20:28
kjosh31-May-06 20:28 
AnswerRe: combobox Pin
InOut.NET31-May-06 22:11
InOut.NET31-May-06 22:11 
QuestionHelp on P/Invoke BSTR* Pin
bluish31-May-06 20:08
bluish31-May-06 20:08 
AnswerRe: Help on P/Invoke BSTR* Pin
rah_sin31-May-06 20:13
professionalrah_sin31-May-06 20:13 
GeneralRe: Help on P/Invoke BSTR* Pin
bluish31-May-06 20:22
bluish31-May-06 20:22 
AnswerRe: Help on P/Invoke BSTR* [modified] Pin
stancrm31-May-06 20:27
stancrm31-May-06 20:27 
Questionupdating and retriving image Pin
leelaraj31-May-06 20:03
leelaraj31-May-06 20:03 
AnswerRe: updating and retriving image Pin
Laubi1-Jun-06 2:19
Laubi1-Jun-06 2:19 

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.