Click here to Skip to main content
15,894,017 members
Home / Discussions / C#
   

C#

 
GeneralRe: A program to delete first n bytes in a file [modified] Pin
Giorgi Dalakishvili24-Nov-08 2:30
mentorGiorgi Dalakishvili24-Nov-08 2:30 
GeneralRe: A program to delete first n bytes in a file Pin
Guffa24-Nov-08 2:16
Guffa24-Nov-08 2:16 
GeneralRe: A program to delete first n bytes in a file Pin
Matjaz-xyz24-Nov-08 2:23
Matjaz-xyz24-Nov-08 2:23 
GeneralRe: A program to delete first n bytes in a file Pin
Giorgi Dalakishvili24-Nov-08 2:46
mentorGiorgi Dalakishvili24-Nov-08 2:46 
GeneralRe: A program to delete first n bytes in a file Pin
Matjaz-xyz24-Nov-08 2:50
Matjaz-xyz24-Nov-08 2:50 
GeneralRe: A program to delete first n bytes in a file Pin
Giorgi Dalakishvili24-Nov-08 2:55
mentorGiorgi Dalakishvili24-Nov-08 2:55 
GeneralRe: A program to delete first n bytes in a file Pin
Matjaz-xyz24-Nov-08 3:16
Matjaz-xyz24-Nov-08 3:16 
GeneralRe: A program to delete first n bytes in a file Pin
Matjaz-xyz24-Nov-08 4:10
Matjaz-xyz24-Nov-08 4:10 
Ok, but with using your code, i get this error:
************* Exception Text **************<br />
System.IO.IOException: The process cannot access the file 'C:\Documents and Settings\milos\My Documents\Visual Studio 2008\Projects\Brisanje Bytov iz datotek\Brisanje Bytov iz datotek\bin\Debug\New Folder\export_104974_00001484.pdf.e3.blob.pdf' because it is being used by another process.<br />
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)<br />
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)<br />
   at System.IO.FileStream..ctor(String path, FileMode mode)<br />
   at Brisanje_Bytov_iz_datotek.Form1.button2_Click(Object sender, EventArgs e) in C:\Documents and Settings\milos\My Documents\Visual Studio 2008\Projects\Brisanje Bytov iz datotek\Brisanje Bytov iz datotek\Form1.cs:line 37<br />
   at System.Windows.Forms.Control.OnClick(EventArgs e)<br />
   at System.Windows.Forms.Button.OnClick(EventArgs e)<br />
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)<br />
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)<br />
   at System.Windows.Forms.Control.WndProc(Message& m)<br />
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)<br />
   at System.Windows.Forms.Button.WndProc(Message& m)<br />
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)<br />
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)<br />
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)<br />


Why is the file in use? Im sure it isnt :P

Regards,
Matjaž

GeneralRe: A program to delete first n bytes in a file Pin
Giorgi Dalakishvili24-Nov-08 4:13
mentorGiorgi Dalakishvili24-Nov-08 4:13 
GeneralRe: A program to delete first n bytes in a file Pin
Matjaz-xyz24-Nov-08 6:58
Matjaz-xyz24-Nov-08 6:58 
GeneralRe: A program to delete first n bytes in a file Pin
Giorgi Dalakishvili24-Nov-08 7:20
mentorGiorgi Dalakishvili24-Nov-08 7:20 
GeneralRe: A program to delete first n bytes in a file Pin
Matjaz-xyz24-Nov-08 19:42
Matjaz-xyz24-Nov-08 19:42 
GeneralRe: A program to delete first n bytes in a file Pin
Giorgi Dalakishvili24-Nov-08 20:02
mentorGiorgi Dalakishvili24-Nov-08 20:02 
GeneralRe: A program to delete first n bytes in a file Pin
Matjaz-xyz24-Nov-08 20:30
Matjaz-xyz24-Nov-08 20:30 
GeneralRe: A program to delete first n bytes in a file Pin
Giorgi Dalakishvili24-Nov-08 20:42
mentorGiorgi Dalakishvili24-Nov-08 20:42 
GeneralRe: A program to delete first n bytes in a file Pin
Matjaz-xyz24-Nov-08 21:24
Matjaz-xyz24-Nov-08 21:24 
GeneralRe: A program to delete first n bytes in a file Pin
Giorgi Dalakishvili24-Nov-08 21:28
mentorGiorgi Dalakishvili24-Nov-08 21:28 
GeneralRe: A program to delete first n bytes in a file Pin
Member 1519807030-Sep-22 23:31
Member 1519807030-Sep-22 23:31 
AnswerRe: A program to delete first n bytes in a file Pin
Giorgi Dalakishvili23-Nov-08 21:06
mentorGiorgi Dalakishvili23-Nov-08 21:06 
QuestionDisabling Button until thread complete Pin
K V Sekhar23-Nov-08 20:42
K V Sekhar23-Nov-08 20:42 
AnswerRe: Disabling Button until thread complete Pin
N a v a n e e t h23-Nov-08 20:45
N a v a n e e t h23-Nov-08 20:45 
GeneralRe: Disabling Button until thread complete Pin
K V Sekhar23-Nov-08 20:53
K V Sekhar23-Nov-08 20:53 
GeneralRe: Disabling Button until thread complete Pin
N a v a n e e t h23-Nov-08 20:56
N a v a n e e t h23-Nov-08 20:56 
AnswerRe: Disabling Button until thread complete Pin
Stephen Lintott23-Nov-08 20:47
Stephen Lintott23-Nov-08 20:47 
GeneralRe: Disabling Button until thread complete Pin
K V Sekhar23-Nov-08 20:54
K V Sekhar23-Nov-08 20:54 

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.