Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Textbox Saving


I have looked through all I could find on saving values in a textbox. It works but not what I'm looking for. Baiscally I want to have these textbox fields to have a value right when the program starts (i.e. IP Addresses), and if need be be able to change them and then send the program back out to the people that use it.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Need Help For Saving Textbox As .nfo
He,
I´ve read a lot about this subject, but nothing works;

I want a save dialog for a textbox, so the user can choose a path, but the extension must be .nfo.

(Save button: cmdSAVE
textbox : cmdNFO)

Please help

TIA, Rob

Saving A Textbox
Is there anyway to save data to a text box? I am trying to save a textbox becasue I cannot use an RTB. I need some help please. I cannot find the command to save the file or open it into/from a textbox. Please help.

Thanks in advance,
MikeJ

Saving From Textbox
I need to save to a file something from a textbox and to be able to read from it everytime the program starts basically for a password thing. I will have a username and password at the beggining of my program. once someone gets into it there's a section where to change it. you know it does the "enter old password" thing then new password twice. I want to be able to save from the newpassword textbox (called newpass) to a file so that the next time a person logs in they have to use the password in that file.

So what I need is :

1. how to save from a textbox to file

2. how to read from the file at the beggining of the program and compare the file to what the user typed as a password.

I know passwords should be encrypted, but this is just for my own practice so I'm omitting that part.

thanks fro any help. - As you can see I'm a newbie to this forum and VB so I appreciate any help.

Saving A TextBox As A Txt File
Hi all.

I have a text box and a button on my form and when the button is clicked, I want the contents of the textbox to be saved into a txt file.

The code I have so far (that doesn't work is);


Code:
Dim strFF As String

Private Sub Command1_Click()

strFF = FreeFile
Open "C:Test.txt" For Input As strFF

Print strFF, Text1.Text
Close strFF

End Sub

I'm working with VB 6.0. I have tried using "write" instead of "print" but it keeps telling me that I need a '#'

Any suggestions?

Saving Textbox Text
I want to save the text in the textboxes. I have a program that has name country all that kind of stuff and I want to save it so I can open it later.
Thank you

Saving Text From A Textbox
Hi everyone,

Im completely knew to this site and it looks really good so far

Now to my question ...

I am trying to save something out of a textbox to a file, now to show you how and what i mean.

Basically the saving part works however, the opening part to it doesn't

When i try to save something similar to this:

blablablabla (this one here)

blablabla

blablabla

Only the first line gets opened and shown in the textbox the rest does not. However, all lines get saved in the file.

I am using a string comment to save it, now im not sure but i think that is the problem and the reason why it doesn't open it properly.


Code:
Private Sub mnuFileOpen_Click()

CommonDialog1.Filter = "Basic Math Calculator|*.bmc"
CommonDialog1.CancelError = True
On Error GoTo ErrHandler
'Display the save dialog box
CommonDialog1.ShowOpen
'Display name of selected file
If CommonDialog1.FileName = "" Then
Exit Sub
End If
Open CommonDialog1.FileName For Input As #1
Line Input #1, strDisplay
txtDisplay = strDisplay
Me.Caption = Me.CommonDialog1.FileName
Close #1
Exit Sub

ErrHandler:
'user pressed the cancel button
Exit Sub

End Sub

Private Sub mnuFileSave_Click()

CommonDialog1.Filter = "Basic Math Calculator|*.bmc"
CommonDialog1.CancelError = True
On Error GoTo ErrHandler
'Display the save dialog box
CommonDialog1.ShowSave
'Display name of selected file
If CommonDialog1.FileName = "" Then
Exit Sub
End If
Open CommonDialog1.FileName For Output As #1
Print #1, txtDisplay
Me.Caption = Me.CommonDialog1.FileName
Close #1
Exit Sub

ErrHandler:
'user pressed the cancel button
Exit Sub

End Sub

Does anyone have a solution?

P.S: Im still a little of a beginner to vb

Thx

Saving/Loading TO/From Textbox
I have 5 text boxes,

i want to input data into those (tooken care of already)

i want to

a) when i click a button, it outputs all the data into 1 text file
b) load that text file again into the program and have it displayed in its approitate text box

thank you

Saving/Opening From/To A Textbox
I have a text editor where I want to be able to save/open. I have a menu item called mnuFileSave (Under mnuFile), and the testbox is called txtMain. How would I go about doing this?

And, no, I can't use a Rich Text Box.

Saving ListView -> TextBox
I have a listbox, like the following:

http://www.freewebs.com/freestyler/Image.JPG

My listview is not this exact one, mine has just 2 collums, both just text. How would I save this to a single text file?

- - - -

I have save code, I just need to save the contents of the listview.

Thanks !!

Help - Saving Textbox To File
I have a sub to save a text box to a file, thats the easy part:

Public Sub SaveToFile(TB As TextBox)
Dim intFile As Integer

'Open up a save file dialog using the previous properties,
'except title
intFile = FreeFile

'Open will overwrite an existing file when for OUTPUT
Open myFileName For Output As intFile

' put the whole text box into the file
Print #intFile, TB.Text

Close #intFile

End Sub

I have a common dialog box attached to my form so I can change the font, size, and color of the text in the textbox. How can I save that information along with the text?

Thanks! I pretty much a n00b at this, so use small words

Saving Text In A Textbox
Ok. Hi ppl, I know how to open .txt files into a text box using the common dialog.....but could someone please tell me how I would go about saving the text in a textbox to a .txt file using common dialog??

Saving Textbox Contents.
Hi,
I'm a newbie, just wanting to know if there is any way, when a user enters a date into a textbox, can this date be saved as the default in the textbox, and when the form is reopened, the 'new' saved date will be shown, until such time as a change to the date is made which would then be the updated default?
Does that make sense?

Cindy

Saving Textbox To Database
Hi!

The problem is this:

There is a number with two decimals in textbox. I'm trying to save it to the database, but somehow the decimals are stored as integer.
And database adds two zeros to the end of the integer to be the decimals.

For example, the number in the textbox is 123,77. But after I saved it, the number in the database is 12377,00 And if the number is 123,70 the number in the database is 1237,00

The code is:

Sub SaveToDatabase(ctlNumber As TextBox, fldColumn As Field)

If ctlNumber > "" Then
If IsNull(fldColumn) Or ctlNumber <> fldColumn Then
fldColumn = ctlNumber
End If
Else
If Not IsNull(fldColumn) Then
fldColumn = Null
End If
End If
End Sub

Thanks!

Saving Textbox To .txt File
Ok. This may be a common question, but I did spend half an hour searching but everything was for listbox to text, excel in a textbox etc. etc.

I need just a simple thing, I want to save a textbox into a .txt file. Later open it back in the textbox.

Or if anyone managed to find a link that has it, pls post it.

Saving Multiline Textbox's
Ok well i know how to save but i was wondering how would i erase the contents of the file if it already exists adn put my new info in it. cause when i press the save button it saves over the old stuff only the first time i hit save. if i was to say hit save a few times then it would jst keep printing the info right after each other.

thanks for the help

if you need me to reword that jst ask and if you want the code for what i already have too.

BIG K

Saving Textbox Text To Txt
I was typing in another text box and it was changing it into binary and entering it into another text box.

Saving To File From A Textbox
Can someone give me the code how to save stuff from the textbox to a text document (.txt) ?

Saving A Textbox To File
I have a text box with some html in it. How do i save it to an html file?

Saving Textbox.text
I have (2) forms. frmMain and frmSetup. In frmSetup I have (2) textboxes. tbUrl and tbCmd. You open frmSetup from frmMain via the MainMenu. I need to input info into the (2) textboxes on frmSetup and have frmMain use those values in a webrequest. I also need whatever I typed into the (2) textboxes to stay there and not change or disappear after I close the form or app. This is what I have so far...

'frmMain
btnRead_click....
dim url as string
url = (tbUrl.text from frmSetup) & (tbCmd.text from frmSetup) & "&email=" & (tbemailaddress.text from frmMain)
----I got the code for the webrequset--------
dim page as string......
tbpage.text = page

TextBox.text Saving To A Variable
Hello--

I am having an issue. I have 2 input forms, one right after the other. Demographic information gets put on both forms, and to get from the first to the second, you hit a simple 'next' button. At the end of the second form, i'd like all this information to get transferred to variables.

1. How do I get the information from the first form into a variable that will be used in code on the second form? (I .hide the first form so its not shown)

2. How can I save the information in the text boxes? It keeps saying errors like 'Argument not optional' or 'Method or Data member not found' when I try to assign variable = text1.text. How would I do this correctly?

Thanks for the help!

-Scoota

Saving Rich Textbox As Word Doc
Ok I have a report that puts a whole bunch of text on a RTB. Now I have a word templete and I want to open that and save the RTB in that templete. I dont know how to copy everything from the RTB and paste it in the templete. I tryed to load the templete and just do a RTB.savefile( whatever location and name ) but it doesn't put it in the templete. heres what I have land.dot is my templete

Set wrd = CreateObject("Word.Application")

wrd.Documents.Add Template:=App.Path & "land.dot", NewTemplate:=False, DocumentType:=0


rtbreport.SaveFile (App.Path & "" & frmreport.txttitle.Text & ".doc")

any ideas?!?!

Saving Textbox With Todays Date
I am trying to save the text in a textbox with the with the current date automatically updated every day by simply clicking a button

This is what I have but it doesnt work

visual basic code:--------------------------------------------------------------------------------Public Function SaveText(Text1 As TextBox) As Boolean
Dim hFile As Integer
Dim sFileName As String

On Error Resume Next
hFile = FreeFile
sFileName = App.Path & "C:" & Format(Now, "yyyymmdd") & ".txt"
Open sFileName For Output As #hFile
Print #hFile, Text1.Text
Close #hFile
End Function

Private Sub Command1_Click()
Call SaveText(Text1)
End Sub

Private Sub Text1_Change()

End Sub
--------------------------------------------------------------------------------

Saving A Empty Textbox To A Db Field
im getting the zero-length string error, this isn't a problem when im saving a new record, i just dont update those fields that are blank,, but when im trying to edit a field i need to remove the old data and replace it with the new data... even if the new data is "".... how can i take an empty string and save it to a field?

Saving The Contents Of Textbox On Harddisk
I am developing a very basic text editor by using textbox control.
I want that I could save this the text written in textbox by on my c drive (like we can save notepad in Windows).
I have placed common dialogue control on form and i show save dialogue box.

Now how can I save it.


Also How can I open a saved fiel on drive to this text editor

Saving A Numeric Value In A Textbox Into Excel
Hello

I was saving the contents of a textbox into an excel cell.

the contents are numeric but when it saves it to the excel cell it formats the cell to a text cell.

is there a way i can save it to a "general" formatted cell?

Saving TextBox Contents Along With My Listview
Okay.. what I am doing is I have a form with a listview and 4 textboxes, and I am able to save the listview contents thanks to someone who put some nice code here. I would now liek to save the contents of the 4 text boxes alomg with the listview contents.

I able to save and Load the Listview with the following code:

[highlight=VB]
Private Sub mnuSave_Click()
With dlgAdd ' Common dialog.
.FileName = vbNullString
' The *.yft is the extension that the dialog will use to filter
' out the file list.
.Filter = "Datalogic List File|*.dlf"
.ShowSave
If .FileName <> vbNullString Then
' Save the listview's data.
saveListview ListView1, .FileName

End If
End With
End Sub

Private Sub mnuLoad_Click()
With dlgAdd ' 'nother common dialog.
.FileName = vbNullString
.Filter = "Datalogic List File|*.dlf"
.ShowOpen
If .FileName <> vbNullString Then
' Save the listview's data.
loadListViewData ListView1, .FileName
End If
End With
End Sub


Private Sub saveListview(ByVal objListView As ListView, ByVal strOutputFile As String)
' Saves the listview to the specified file.
Dim intFreeFile As Integer
Dim itmLoop As ListItem
Dim isbSubItem As ListSubItem
Dim strData As String

strData = vbNullString
For Each itmLoop In objListView.ListItems
' Build a comma (per column), carriage return (line) delimited string.
strData = strData & itmLoop.Text & ","
For Each isbSubItem In itmLoop.ListSubItems
strData = strData & isbSubItem.Text & ","
Next
' Remove the last comma & add a carriage return.
strData = Left$(strData, Len(strData) - 1) & vbCrLf
Next
' Remove the last carriage return.
strData = Left$(strData, Len(strData) - 1)

intFreeFile = FreeFile
Open strOutputFile For Output As #intFreeFile
Print #intFreeFile, strData
Print #intFreeFile, Text1.Text
Print #intFreeFile, Text2.Text
Print #intFreeFile, Text3.Text
Print #intFreeFile, Text4.Text

Close #intFreeFile
End Sub

Private Sub loadListViewData(ByRef objListView As ListView, ByVal strFile As String)
' Loads the listview with the data from the specified file.
Dim intFreeFile As Integer, intCounter As Integer
Dim itmAdd As ListItem
Dim strSplit() As String
Dim strLineRead As String
Dim Temp As String

intFreeFile = FreeFile
objListView.ListItems.Clear
Open strFile For Input As #intFreeFile
Input #intFreeFile, strLineRead
Text1.Text = strLineRead
Input #intFreeFile, strLineRead
Text2.Text = strLineRead
Input #intFreeFile, strLineRead
Text3.Text = strLineRead
Input #intFreeFile, strLineRead
Text4.Text = strLineRead
Do While Not EOF(intFreeFile)
Line Input #intFreeFile, strLineRead

If strLineRead <> vbNullString Then
' Split the line up into an array.
strSplit = Split(strLineRead, ",")

' Loop through the columns.
For intCounter = LBound(strSplit) To UBound(strSplit)
If intCounter = 0 Then
Set itmAdd = objListView.ListItems.Add(, , strSplit(0))
Else
If intCounter < objListView.ColumnHeaders.Count Then
itmAdd.SubItems(intCounter) = strSplit(intCounter)
End If
End If
Next

' Clear the array.
Erase strSplit
' And destroy the list item used for adding.
Set itmAdd = Nothing
End If
Loop


Close #intFreeFile
End Sub

[highlight=VB]

Obviously I have not done much with input/output...

Please help.. Thanx...

Saving Data In A Textbox And The Value Of A Checkbox
Hey, How can i save the values put into textbox's for viewing later?
Example: I enter in how many pushups i do on one day, then i want to save that in a textbox so when i reopen the program the next day it will still be there?
What would be the most efficient way of doing this?

Trouble Saving Input With Textbox
Hello all.

I am making an HTML Editor. My very first Visual Basic application. It's going well so far but I have a few questions but I'll lay this one before you for now.


When I save the data in the editing space(rtf textbox) and open it back into the editor it shows up just fine. However, when you open it with any other text editor such as notepad, wordpad ect. It shows this along with the data you intered into the textbox:



{
tf1ansiansicpg1252deff0{fonttbl{f0fnilfcharset0 Arial;}}
viewkind4uc1pardlang1033fs20 this is the text intered into the editor(rtf text)
par }




What can I do to fix this so it saves ONLY The text intered into the textbox?

Thanks a million.

P.S Im a Newcomer to VB so your going to have to explain detail by detail.

Saving Picturevbox And Textbox Into One File
Hello everyone,

Can you save a picture and a textbox in to one file.
And later on open it????

If you have an other Idea, tell me please!!!


Frendly greetings Cyberc()()l

Saving Text In A Textbox To A File.
Greetings,

If I am writing a program where a textbox (txtGage) has data written in it, and the user wants to save that data to a file, then what would the code be for bringing up the Save dialog box and allowing them to save the data from the text box, into the file, once they name the file and press the Save button?

Thank you,
Jim

Saving Unique Records Using Textbox
hi
i have a more than 10 textboxes, while at each text box i have to check the record which is already exists or not, iam useing access as backend and ado control, pls help
cheers
parthi_75@rediff.com

Saving Textbox In ANSI Format?
To let you know I am creating a text editor for perl and if you save the text using standard way of doing it the text is saved in a strange format. All the line feeds are converted into these little squares..(no idea what there called)but anyways I want to be able to save the textbox in ANSI format like how http://www.textpad.com lets you save it in ANSI format. Thats what I use right now but I want to have the specialized features of my program to do it. So anyways as I was saying I want the text to be saved in ANSI format. I'm sure this is not to hard. If anyone can help I would appreciate it.

Saving A Multiline Textbox To A Txt File
I'm using the following code to save the textbox:

Text144.Text = ""


strtxt = Text14.Text
arrlines = Split(strtxt, vbCrLf)
    
For Each strline In arrlines
Text144.Text = Text144 & strline  & vbCrLf
Next
   

FileNum = FreeFile
Open App.Path & " empfile.jfl" For Output As FileNum
Print #FileNum, Text144.Text
Close FileNum


the problem is that each time i load + save the text I get an extra vbCrtl at the end, how can i delete them all ?


Saving A MultiLine Textbox Into A Text File...
Hello,
Using the Print #1, text1.text to save the textbox's text in a .txt file doesn't work. It writes nothing... Anyway to fix this ?

Thanks!

Saving First Line In Textbox And Searching String
I have some text which I will be pasting into a text box. Now I just want the first line of it placed in a string.

Now I also want to be able to type something into a textbox and for it to search a list of entries and find all entries with the search criteria. For example: A list has entries of red, blue, redhead, green,redness. I search for red and it displays those 3 entries.

Thanks to anyone who can help me.

Common Dialog Saving Without Rich Textbox
Well I guess the title explains it. Anyway I am making a chat program and learning as I do it and I want the feature to save your conversations however I know how to do this with a Rich textbox, but not a normal textbox. I would much prefer the window to do the save which Common Dialog offers.

Modifying A DataSource-linked TextBox Without Saving!
Hello again! I've run across a small issue with modifying a textbox value (which is pulled from a table/column in my Access database). I have 5 buttons (+1, -1, 0, +.5, -.5) I use to increase/decrease this value. I only want the value in the textbox to save in the DataBase file *IF* I press the Update button, NO OTHER TIME! The update code works fine (as far as I can tell at least), and I managed to get the click_event code on the DataList (which the textbox is linked to) to work.

Basically, when I click on various entries in the DataList, I want the values to only change if I press the Update button. The other Command buttons (increasing/decreasing values) modify the textbox, but I want that value to default back to the database's value if I move to another entry in the dbl


Some information about Controls:

ADODC - adoPlayerList, linked to Table PlayerList, column PlayerName, displayed in dblCharName (DataList).
txtPointsTotal - linked via DataSource, to the CurrentPointsTotal column in the same Table.


Code:
Dim rs As DAO.Recordset, db As DAO.Database
Dim points As Single

Private Sub dblCharName_Click()
dblCharName.Refresh
adoPlayerList.Recordset.Bookmark = dblCharName.SelectedItem
End Sub

Private Sub cmdDownHalf_Click()
points = -0.5
Set db = OpenDatabase("FormData.mdb")
Set rs = db.OpenRecordset("PlayerList", dbOpenDynaset)
Me.txtPointsTotal.Text = Me.txtPointsTotal.Text + points
rs.Edit
rs!CurrentPointsTotal = points
rs.Close
End Sub

Private Sub cmdDownOne_Click()
points = -1
Set db = OpenDatabase("FormData.mdb")
Set rs = db.OpenRecordset("PlayerList", dbOpenDynaset)
Me.txtPointsTotal.Text = Me.txtPointsTotal.Text + points
rs.Edit
rs!CurrentPointsTotal = points
rs.Close
End Sub

Private Sub cmdUpdate_Click()
Set db = OpenDatabase("FormData.mdb")
Set rs = db.OpenRecordset("Select * from PlayerList where PlayerName = '" & dblCharName & "'")
If (rs.RecordCount >= 1) Then
rs.Edit
rs!CurrentPointsTotal = txtPointsTotal.Text
rs.Close
dblCharName.Refresh
Me.txtPointsTotal.Refresh
MsgBox "Player record updated successfully!", vbOKOnly, "Record Updated"
End If
End Sub

Private Sub cmdUpHalf_Click()
points = 0.5
Set db = OpenDatabase("FormData.mdb")
Set rs = db.OpenRecordset("PlayerList", dbOpenDynaset)
Me.txtPointsTotal.Text = Me.txtPointsTotal.Text + points
rs.Edit
rs!CurrentPointsTotal = points
rs.Close
End Sub

Private Sub cmdUpOne_Click()
points = 1
Set db = OpenDatabase("FormData.mdb")
Set rs = db.OpenRecordset("PlayerList", dbOpenDynaset)
Me.txtPointsTotal.Text = Me.txtPointsTotal.Text + points
rs.Edit
rs!CurrentPointsTotal = points
rs.Close
End Sub

Private Sub cmdZeroPoints_Click()
points = 0
Set db = OpenDatabase("FormData.mdb")
Set rs = db.OpenRecordset("PlayerList", dbOpenDynaset)
Me.txtPointsTotal.Text = points
rs.Edit
rs!CurrentPointsTotal = points
rs.Close
End Sub

Please note: I tried commenting out the database-saving commands in all those cmd buttons (except Update), and I still could not get the values to just "temporarily" set.

Another note: I had to use DAO for the database saving method because I couldn't figure out a way to get .Edit to work, otherwise.

Saving Textbox Content Via Common Dialoge
am i being think or just generally stupid ???

I have a multilined textbox and i want to save the contents to a new csv file via the common dialoge control function. How do i do it ???????

Saving List/textbox Data In A Different Form
HELP

i have a listbox and a textbox, which become populated as i go through my program.

How would i go about selecting the data from the listbox and the textfield to show on a different form.

The data would need to be saved, either to a datafile or a flexgrid.

It would need to be saved as i need to perform calculations with the saved data (likefinding out the average amount a customer spends)

How would i go about this please

ANYBODY

THANKS

I willl repay the favour 1 day............................will come and clean out your drains or something!

Saving Textbox && Labels In Registry And Matching Them Up
Ok, here's my problem, please read the whole thing, especially the example:
I have a combo box where the user can add various things, and they then change caption of label1 and label2. Now they save waht they typed in the combo box and labels into the registry.

How can I have the same text appear in both labels everytime the user has selected a specific item in the combo box.

ex (for simplicity, label2 has been excluded from this example):
User types "Hello" in combo1, and has label1 say "ABC". Saves settings. User then adds another entry into combo1 ("Hi" and has label1 say "123"). Saves settings.

How can I get label1's caption to always say "ABC" when "Hello" is chosen in combo1 and always have label1 say "123" when "Hi" is chosen in combo1. Here's the real kicker: The user can and will over time delete certain entries from the combo box. So if they delete "Hello" from combo1, and they then click on "Hi" in combo1, I want label1 to say "123" not "ABC".

PLEASE tell me if this wasn't clear enough. I would really appreciate your help.



Edited by - Marce22 on 1/26/2004 12:47:03 PM

Saving Textbox Properties When A Program Is Closed
If I have changed the BackColor property of a textbox while a program is running, what code do I need to write so that the textbox has the same color when I close and re-open the program.

Saving TextBox Data To A Text File.. HOW??
I tried this from VB forum:

Private Sub Command1_Click()

Write #1, holder.Text
Close #1

End Sub

this doesn't work at all, Get a compile error -- "Expected End of Statement"

could someone please show me how to write the contents of a TextBox to a file, and to read it back in??

The VB stuff seems to not work directly for EVB..

Saving Listbox And Textbox Data Of A Form Into A Textfile
Any experts here to guide me on how to save a listbox and textbox data together in one form, and display the values back everytime I load the form. Example,

I have a form named Reservation. Inside this Reservation form I have a listbox and a few textbox.

I want to save the listbox data and a few textbox namly...movie name, theatre room number....etc. How do I do it? Thanks.

Besides this there are alot of validation probs and afew bugs...I have attached my project in this message...anyone can help me...Deeply appreciated.

Saving Text From (Rich)TextBox To A WordPerfect File...(and To *.doc)
Hello Everybody,

I've a simple question yet, which I fear, has a difficult awnser, how can I save my text from a (Rich)TextBox to a WordPerfect file??? IF anybody knows, can they then explain to me how???
And for the next question, multiable ppl have asked on this forum but none has had a clear anwser, is its possible to save the text from my (Rich)TextBox to a *.doc document??? If yes, how(exactly)???

Saving Textbox Text To A File WITHOUT User Clicking.
Hello,

Is there anyway for me to get my program to just save my textbox text to a txt file without the user having to enter a filename and click on save?

Example.
Right now I am using this code.

But as you can see it requires the user to enter a file name and click save.

My form has the commponent Microsoft Common Dialog Control (Named cdl)
a textbox (Named txtTest.txt)

and a command button


VB Code:
Private Sub Command1_Click()    cdl.Filter = "App File|*.smd"    cdl.InitDir = "C:Test.Txt"    cdl.ShowSave    If Len(cdl.FileName) = 0 Then Exit SubClose    Open cdl.FileName For Binary As #1    Put #1, , txtTest.Text    Close #1End Sub


Is there any way to change this so that it is auto save when the user clicks the command button. Also I would want the program to save the text to the txt file without deleteing what is already in the file. So it would just add it on in a new line.

Thank you all!
Stilekid007

Saving A Textbox's Text Automatic When Program Is Closed
i want a textbox's text in my program to be saved when the user closes the program, how would i do that?

Saving Textbox To Textfile (cancel Button Isn't Working Properly)
I checked numerous sources for the commondialog save control, but none of them had the cancel button working properly, when i click on the cancel button, some sort of error would appear.

VB Code:
Private Sub cmdSave_Click()On Error Resume NextcdSaveAs.Filter = "Text files (*.txt)|*.txt.|"cdSaveAs.FilterIndex = 1cdSaveAs.Action = 2Open cdSaveAs.FileName For Output As #1Print #1, txtData.TextClose #1Exit Sub If err.Number <> 0 ThenExit SubEnd IfEnd Sub

Saving Text In A Textbox Each Time A User Opens The Program (Notepad Type Prog)
Hi. I want to create a program that is just like Notepad, but has the option of being "always on top."

I'm sort of a newbie at programming so I figure the simplest way to do this would be to make a large textbox on a form with a button to save and a button that makes the form 'always on top.' If anyone has a better idea that would accomplish this (like how to make it look more like the real notepad), I'd love to hear it .

Anyway, besides the possibility of someone suggesting something, what my main question is, how do I make it so when the user presses the 'Save' button the text actually saves and is re-loaded each time I open the program?

What would be the best way to implement this feature?

Thank you,
Brad

Problem Of Saving Textbox Control On Picturebox Control
Hello Everybody....hope all u doing fine ...
i hve a problem in my application as i m working 4 the image processing application for the first time........In my application I open the bmp or jpeg img in picture box control in application i given facility to the user like there i hve given textbox control which can be placed on the opened bmp file wherever the user wants.....i hve done upto this but when i save the file the text box controls which have been placed before not saved ...
Does anybody tell me how can i save my textbox control on th image...
plz tell me the code as i don;t hve any experince in this...
I hope i will get reply by all u experts...
Below is the cod i hve done to save but problem is that it is not saved with textbox control....plz check it ...to display the image m using picture box control...
Dim MYFile, tmp
'On Error GoTo cancel
CommonDialog1.InitDir = App.Path
CommonDialog1.DefaultExt = ".bmp"
CommonDialog1.Filter = "Bitmaps(*.bmp)|*.bmp"
CommonDialog1.ShowSave
MYFile = CommonDialog1.filename
SavePicture PictureBox1.Image, MYFile

waiting 4 reply...
Thanking You

Copyright © 2005-08 www.BigResource.com, All rights reserved