|
-
Aug 14th, 2006, 10:33 AM
#1
Thread Starter
New Member
Save text string to a text file on Pocket PC
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
-
Aug 14th, 2006, 01:04 PM
#2
Frenzied Member
Re: Save text string to a text file on Pocket PC
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()
-
Aug 16th, 2006, 10:38 AM
#3
Thread Starter
New Member
Re: Save text string to a text file on Pocket PC
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.
-
Aug 16th, 2006, 12:34 PM
#4
Re: Save text string to a text file on Pocket PC
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
My usual boring signature: Nothing
 
-
Aug 17th, 2006, 01:17 AM
#5
Frenzied Member
Re: Save text string to a text file on Pocket PC
Or
Imports System.IO
Pete
-
Aug 17th, 2006, 02:24 AM
#6
Thread Starter
New Member
Re: Save text string to a text file on Pocket PC
Yeah, that's more like it. Thanks PeteVick. I think I had a bit of finger trouble but it's working now!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|