Results 1 to 2 of 2
2001-07-06, 17:32 #1MitzEclipseGuest
Displaying Results within a TextBox (VB 6.0)
I need help displaying the results of my variables within a text box. Basically, I need to be able to display 3 variables within a text box.
Basically, I can get the output what I want, and the content is perfect, but the alignment is the problem.
I've tried vbTab and vbCrlf and the formatting isn't right.
What I'm trying to do is to take the DATE from DateResults and put it on the SAME LINE as the Results from Domain 1 and Domain 2. Then for the next file, it will display on the next line.
Below is what I have so far. As of right now, the date gets displayed on the top of the text box and the results gets displayed on the bottom -- I want to merge the two.
thanks for your help
'Searching for Date/Time/Year statistics
Dim varWhen As String
varWhen = InStr(1, strContent, 28)
Dim DateResults As String
DateResults = InStr(1, strContent, "Tue")
Dim strWhen, strDateDisplay As String
strWhen = strContent
strDateDisplay = Mid(strContent, DateResults, 28)
'Searching for Number of Connections in Domain 1
Dim Results As Integer
Results = InStr(1, strContent, ">")
'MsgBox (Results) (for use when figuring out what character position the > is in)
Dim strVar, strSearch As String
strVar = strContent
strSearch = Mid(strContent, Results + 2, 3)
'Display the results of search for Domain 1
txtResults.Text = strDateDisplay & vbTab & txtResults.Text & Int(strSearch)
'Searching for Number of Connections in Domain 2
Results = InStr(Results + 1, strContent, ">")
strSearch = Int(Mid(strContent, Results + 2, 3))
'Display the results of search for Domain 2
txtResults.Text = strDateDisplay & vbTab & txtResults.Text & vbTab & strSearch & vbCrLf
'Display the last selected file in the txtFileContent textbox
txtFileContent.Text = strContent
2001-07-06, 20:13 #2
- Join Date
- Dec 2000
- Thanked 0 Times in 0 Posts
Re: Displaying Results within a TextBox (VB 6.0)
You're using the wrong control here to get the job done. Use the listbox and set it to 3 columns instead of the textbox. I think this should make your life a little easier.