Click here to Skip to main content
15,898,222 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Guide to multiple client Pin
shee_dee8614-May-08 15:23
shee_dee8614-May-08 15:23 
GeneralRe: Guide to multiple client Pin
Christian Graus14-May-08 15:36
protectorChristian Graus14-May-08 15:36 
QuestionWant to do a pagesetup for the Excel file in VB Pin
sant_leo14-May-08 8:08
sant_leo14-May-08 8:08 
QuestionHow to use a int128 in VB.net? Pin
kristofvanderhaeghen14-May-08 7:44
kristofvanderhaeghen14-May-08 7:44 
AnswerRe: How to use a int128 in VB.net? Pin
Dave Kreskowiak14-May-08 13:46
mveDave Kreskowiak14-May-08 13:46 
AnswerRe: How to use a int128 in VB.net? Pin
kristofvanderhaeghen15-May-08 3:00
kristofvanderhaeghen15-May-08 3:00 
QuestionWiting at the specified position a text file Pin
en.Mahdi14-May-08 6:15
en.Mahdi14-May-08 6:15 
AnswerRe: Witing at the specified position a text file Pin
Guffa14-May-08 7:13
Guffa14-May-08 7:13 
The problem with that is that files are not line based, so you can't change a line without changing every following line throughout the entire file. Additionaly, files are not even text based, so you can't determine where a line or a character is in the file without reading the file and decoding it into text.

For example, depending on the encoding, the character following "o" in "hello", may (for the most common encodings) be at the file position 5, 8 or 12, so you have to read the file up to that position to know exactly where it is.

There are basically two ways of doing what you want:

1. Read the entire file into a string. Make the changes to the string. Rewrite the entire file with the string.

2. Read the file as a binary file, decoding each character to find out the file position where you want to insert the data. Read the rest of the file into a buffer (byte array). Reposition the file at the desired position. Endcode your text and write it to the file, followed by the contents of the buffer.

So, either way you will be reading the entire file, and rewriting it at least from the point where you want to change it until the end of the file.

Despite everything, the person most likely to be fooling you next is yourself.

GeneralRe: Witing at the specified position a text file Pin
Mycroft Holmes14-May-08 14:42
professionalMycroft Holmes14-May-08 14:42 
GeneralRe: Witing at the specified position a text file Pin
Guffa15-May-08 1:02
Guffa15-May-08 1:02 
AnswerRe: Witing at the specified position a text file Pin
Ashfield14-May-08 21:13
Ashfield14-May-08 21:13 
GeneralRe: Witing at the specified position a text file Pin
Guffa15-May-08 1:05
Guffa15-May-08 1:05 
GeneralRe: Witing at the specified position a text file Pin
Ashfield15-May-08 3:01
Ashfield15-May-08 3:01 
GeneralRe: Witing at the specified position a text file Pin
Guffa15-May-08 4:38
Guffa15-May-08 4:38 
Questionuser controls calling function on parent forms Pin
wbasser14-May-08 3:37
wbasser14-May-08 3:37 
AnswerRe: user controls calling function on parent forms Pin
mr_lasseter14-May-08 5:25
mr_lasseter14-May-08 5:25 
GeneralRe: user controls calling function on parent forms Pin
wbasser14-May-08 7:04
wbasser14-May-08 7:04 
GeneralRe: user controls calling function on parent forms Pin
Dave Kreskowiak14-May-08 7:19
mveDave Kreskowiak14-May-08 7:19 
QuestionRe: user controls calling function on parent forms Pin
mr_lasseter14-May-08 7:25
mr_lasseter14-May-08 7:25 
AnswerRe: user controls calling function on parent forms Pin
wbasser14-May-08 7:35
wbasser14-May-08 7:35 
GeneralRe: user controls calling function on parent forms Pin
mr_lasseter14-May-08 7:42
mr_lasseter14-May-08 7:42 
GeneralRe: user controls calling function on parent forms Pin
wbasser14-May-08 7:49
wbasser14-May-08 7:49 
Questiona question regarding the "abilities" of VB Pin
Green Fuze14-May-08 1:26
Green Fuze14-May-08 1:26 
AnswerRe: a question regarding the "abilities" of VB Pin
Christian Graus14-May-08 1:38
protectorChristian Graus14-May-08 1:38 
GeneralRe: a question regarding the "abilities" of VB Pin
Green Fuze14-May-08 3:09
Green Fuze14-May-08 3:09 

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.