|
-
Sep 19th, 2000, 06:54 AM
#1
Thread Starter
New Member
Hello All,
I have an application for which I need to keep a 'running log window' with the application. I should be able to append text to the log window as some processes are completed etc. and finally have an option to save the results of the logwindow to a text file.
The log window need not be attached to the parent window i.e. it also can be floating..
Currently I have the VB Debug.Print to spit out messages but, in my compiled application i would like them to appear in a text box. i tried RichText Control, But I could not find a way to add text regularly.
Can some one kindly point me to a control or a sample code or a method with which i can do it. ?
thanks a lot
Regards
Sathya
Sathya Krishnamurthy
Research Scientist , CSCS
Switzerland
-
Sep 19th, 2000, 07:01 AM
#2
Junior Member
hi,
I'm sure you have tried something like that:
Code:
MyTextBox.text = MyTextBox.text & "abc"
?
-
Sep 19th, 2000, 07:33 AM
#3
Thread Starter
New Member
Hi Syl
From MSDN
<quote>
The Text setting for a TextBox control is limited to 2048 characters unless the MultiLine property is True, in which case the limit is about 32K.
</quote>
So for a running text it is difficult to use it.
Thanks for your response.
Ciao
Sathya
Sathya Krishnamurthy
Research Scientist , CSCS
Switzerland
-
Sep 19th, 2000, 07:50 AM
#4
Have you tried a listbox?
Code:
list1.additem "This is a line of text"
I always use it for logging. I do keep an eye on the list item's count, so if it goes over say 1000 items, i clear the first 500 and save them to a file. Then I erase the first 500 items from the listview...
Hope I could help... Tell me if you need more info...
-
Sep 19th, 2000, 07:53 AM
#5
Hi...
Wrote & tested some code:
Code:
Dim T As Integer
' Fill listbox with 2000 items...
For T = 1 To 2000
List1.AddItem "Blah" & T
Next T
' Remove first 1000...
While List1.ListCount > 1000
' Save Item(0) here to your logfile
List1.RemoveItem 0
Wend
Enjoy....
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
|