Hi all,
I have a little prob wif my app. You see, I have a text box that lets users save a message even with multiline.
Problem:
I'm trying to load it into a label control but not sure how to go about doing it
any help appreciated
thanx
Printable View
Hi all,
I have a little prob wif my app. You see, I have a text box that lets users save a message even with multiline.
Problem:
I'm trying to load it into a label control but not sure how to go about doing it
any help appreciated
thanx
Maybe something along the lines of
Code:Open "c:\test\test.txt" For Input As #1
Label1.Caption = Input(LOF(1), #1)
Close #1
If I understand correctly, this code will set the caption of the label equal to the text in the field. This example uses the LostFocus event of the textbox, so as soon as you exit the text field the Label will change.
Remember to set the width of your label and to set autosize and wordwrap to true.Code:Private Sub Text1_LostFocus()
Label1.Caption = Text1.Text
End Sub
[Edited by jbart on 09-20-2000 at 07:01 AM]
Hi Jbart,
i know you can use that but the file is changed using another program
Great. Then the code that Iain (with an "i") posted should do the trick.