I am having a similar problem to that of FireFox where he is trying to save text from a text box ot a .txt file on a pocket PC, I see that it wasn't resolved and was wondering if anyone has any answers?
Thanks
Printable View
I am having a similar problem to that of FireFox where he is trying to save text from a text box ot a .txt file on a pocket PC, I see that it wasn't resolved and was wondering if anyone has any answers?
Thanks
This is in the help files, and all over the net, but...
VB Code:
Dim sw As StreamWriter = File.AppendText("\My Documents\myfile.txt") sw.WriteLine(textbox1.text) sw.Flush() sw.Close()
Thanks Petevick but I've tried that already, When I try Dim sw As StreamWriter I get the error Type 'StreamWriter' is not defined.
I think it may have something to do with the dev environment? I'm writing an app for a mobile barcode scannin device that uses CE 4.2 and I'm using VB.Net 2003 (Compact Framework)
Everything else so far is fine but I can't save the text I've scanned into a text file.
Usually that means that you don't have the correct reference in your project references, but I think this reference is System, and I find it hard to believe that you don't have that.
How about the fully decorated line:
Private sWriter As System.IO.StreamWriter
Or
Imports System.IO
Pete
Yeah, that's more like it. Thanks PeteVick. I think I had a bit of finger trouble but it's working now! :)