BleepingComputer.com: VB - Another question

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.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

VB - Another question TextBox usage

#1 User is offline   KermitD 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 81
  • Joined: 28-April 05
  • Location:Stelle, Illinois

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.

#2 User is offline   Jay Cat 

  • New Member
  • Pip
  • Find Topics
  • Group: Members
  • Posts: 7
  • Joined: 03-August 05

Posted 03 August 2005 - 06:14 PM

Set the MultiLine property of the TextBox to True.

#3 User is offline   KermitD 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 81
  • Joined: 28-April 05
  • Location:Stelle, Illinois

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.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users