Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

VB - Another question


  • Please log in to reply
2 replies to this topic

#1 KermitD

KermitD

  • Members
  • 81 posts
  • OFFLINE
  •  
  • Location:Stelle, Illinois
  • Local time:01:07 AM

Posted 02 August 2005 - 12:39 PM

I have a form which includes a TextBox. When I run the program two things are happening which puzzle me.

First, even though I have the "Scrollbars" property set to 3-Both, yet when the text to be displayed in the TextBox exceeds the size of the box, no scrollbars are displayed. The text just runs off the end of the top line in the TextBox.

Second, I have this line of code:
txtDisplay.Text = "GetAbsolutePathName: " & _
mFileSysObj.GetAbsolutePathName( _
filFileBox.Path) & vbNewLine & _
"GetDriveName: " & mFileSysObj.GetDriveName( _
filFileBox.Path) & vbNewLine & _
"GetParentFolderName: " & _
mFileSysObj.GetParentFolderName( _
filFileBox.Path) & vbNewLine & _
"GetTempName: " & mFileSysObj.GetTempName

I expect to get a CRLF for the "vbNewLine", but I get "||". Can vbNewLine be something other than CRLF? Any ideas why I see what I see? Maybe one fix will resolve both problems. I keep thinking that maybe there is someplace where vbNewLine is defined (and can be redefined).
KermitD
Choices have consequences.

BC AdBot (Login to Remove)

 


#2 Jay Cat

Jay Cat

  • Members
  • 7 posts
  • OFFLINE
  •  
  • Local time:01:07 AM

Posted 03 August 2005 - 06:14 PM

Set the MultiLine property of the TextBox to True.

#3 KermitD

KermitD
  • Topic Starter

  • Members
  • 81 posts
  • OFFLINE
  •  
  • Location:Stelle, Illinois
  • Local time:01:07 AM

Posted 03 August 2005 - 11:37 PM

Thanks JAY CAT,

It solves both problems. From now on, I'll look at the form-element properties a lot closer. I love this forum.

KermitD
KermitD
Choices have consequences.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users