Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.basic.visual.misc > #1847
| From | "Nobody" <nobody@nobody.com> |
|---|---|
| Newsgroups | comp.lang.basic.visual.misc |
| Subject | Re: Replacing text in a text file with VB6 |
| Date | 2011-02-08 20:12 -0500 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <iispmg$nl6$1@speranza.aioe.org> (permalink) |
| References | <c45da097-c1e0-4972-bae0-cad00813ca40@s28g2000prb.googlegroups.com> <iis7k0$en6$1@speranza.aioe.org> <iisbch$ou4$1@news.eternal-september.org> |
"Mike Williams" <Mike@WhiskyAndCoke.com> wrote in message news:iisbch$ou4$1@news.eternal-september.org... > "Nobody" <nobody@nobody.com> wrote in message > news:iis7k0$en6$1@speranza.aioe.org... > >> Also, VB doesn't have a truncate function, so you have to >> recreate the file(For Output). > > You can however easily truncate a file in VB if you open it with the > CreateFile API function (specifying OPEN_EXISTING) and then use > setFilePointer followed by SetEndOfFile. Yep! Sample code: http://groups.google.com/group/microsoft.public.de.vb/msg/cf7935cd3b2bf06c
Back to comp.lang.basic.visual.misc | Previous | Next | Find similar | Unroll thread
Re: Replacing text in a text file with VB6 "Nobody" <nobody@nobody.com> - 2011-02-08 20:12 -0500
csiph-web