Click here to Skip to main content
15,922,696 members
Home / Discussions / C#
   

C#

 
GeneralRe: Extracting attribute information from an XML file Pin
Vikram A Punathambekar18-Sep-05 22:42
Vikram A Punathambekar18-Sep-05 22:42 
GeneralRe: Extracting attribute information from an XML file Pin
bpontillo18-Sep-05 23:18
bpontillo18-Sep-05 23:18 
QuestionCode to flip a window Pin
Amir Harel18-Sep-05 20:29
Amir Harel18-Sep-05 20:29 
QuestionAbt Structure of Text Files Pin
akshayswaroop18-Sep-05 20:14
akshayswaroop18-Sep-05 20:14 
AnswerRe: Abt Structure of Text Files Pin
enjoycrack18-Sep-05 20:31
enjoycrack18-Sep-05 20:31 
AnswerRe: Abt Structure of Text Files Pin
akshayswaroop18-Sep-05 20:35
akshayswaroop18-Sep-05 20:35 
AnswerRe: Abt Structure of Text Files Pin
mav.northwind19-Sep-05 2:53
mav.northwind19-Sep-05 2:53 
AnswerRe: Abt Structure of Text Files Pin
lmoelleb19-Sep-05 20:35
lmoelleb19-Sep-05 20:35 
QuestionFind HyperLinks Pin
A.Grover18-Sep-05 19:47
A.Grover18-Sep-05 19:47 
AnswerRe: Find HyperLinks Pin
enjoycrack18-Sep-05 20:25
enjoycrack18-Sep-05 20:25 
AnswerRe: Find HyperLinks Pin
seee sharp18-Sep-05 23:14
seee sharp18-Sep-05 23:14 
QuestionDataGridBoolColumn - event Pin
JuergenLissmann18-Sep-05 18:54
JuergenLissmann18-Sep-05 18:54 
AnswerRe: DataGridBoolColumn - event Pin
deep718-Sep-05 20:10
deep718-Sep-05 20:10 
QuestionCommunication With ports in Visual.NET Pin
samira forooghi18-Sep-05 18:45
samira forooghi18-Sep-05 18:45 
AnswerRe: Communication With ports in Visual.NET Pin
zon_cpp19-Sep-05 6:08
zon_cpp19-Sep-05 6:08 
AnswerRe: Communication With ports in Visual.NET Pin
zon_cpp19-Sep-05 6:08
zon_cpp19-Sep-05 6:08 
QuestionSimple Database Problem Pin
18-Sep-05 16:57
suss18-Sep-05 16:57 
AnswerRe: Simple Database Problem Pin
KaptinKrunch18-Sep-05 17:12
KaptinKrunch18-Sep-05 17:12 
AnswerRe: Simple Database Problem Pin
KaptinKrunch18-Sep-05 17:14
KaptinKrunch18-Sep-05 17:14 
AnswerRe: Simple Database Problem Pin
FusionCoding19-Sep-05 3:20
FusionCoding19-Sep-05 3:20 
Questiongetting file bytesize Pin
g00fyman18-Sep-05 16:40
g00fyman18-Sep-05 16:40 
AnswerRe: getting file bytesize Pin
Ashok Dhamija18-Sep-05 18:14
Ashok Dhamija18-Sep-05 18:14 
GeneralRe: getting file bytesize Pin
g00fyman18-Sep-05 18:45
g00fyman18-Sep-05 18:45 
GeneralRe: getting file bytesize Pin
g00fyman18-Sep-05 18:50
g00fyman18-Sep-05 18:50 
GeneralRe: getting file bytesize Pin
Ashok Dhamija18-Sep-05 19:12
Ashok Dhamija18-Sep-05 19:12 
Try using Refresh() method of FileInfo class before calling the Length property every time you want to update it, i.e.,
fiMyFile.Refresh();
lLengthMyFile = fiMyFile.Length;

Though I have not checked it in the context of your application (but it worked in my application having some different requirements), it may work if the character is being written in the file as it is being typed.

Another way out could be to use the Length property of FileInfo as above as and when you save the file. And, after that as the characters are being typed, you keep a count of the characters / bytes of the unsaved data and add it to the Length calculated earlier for the saved data.

I hope it works.

Regards,
Ashok Dhamija
_____________________________
Padam Technologies

-- modified at 1:13 Monday 19th September, 2005

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.