Jump to content

capitalize Drivelistbox

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
6 replies to this topic

#1
sweezapizza

sweezapizza

    Newbie

  • Members
  • Pip
  • 3 posts
Gutentag!

I am working in VB6 and want to capitalize the drive letters in a drivelistbox when the form loads. Any suggestions?

Thanks in advance,
sweezapizza

#2
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
So the driver list box displays c: or a: and you want them A: or C:??

#3
sweezapizza

sweezapizza

    Newbie

  • Members
  • Pip
  • 3 posts
Yep. That is what I would like.

#4
Lop

Lop

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,172 posts
Couldn't you just use the strtoupper() function after the list is generated or while it is being generated?

#5
sweezapizza

sweezapizza

    Newbie

  • Members
  • Pip
  • 3 posts
So how would that work...

Private Sub Form_Load()
strtoupper (Drive1.Drive)
End Sub

??????????????????

#6
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
That function doesn't even exist in VB lol. The uppercase command is UCase$ and I doubt you can change that!

UCase$ Drive.Drive

Does NOT work, the only way to do it is, just change the font a an uppercase only font! If there is any other method, sorry but I don't know it.

#7
OlimilO

OlimilO

    Newbie

  • Members
  • Pip
  • 1 posts
Hello SweezaPizza
try This ;-)

Private Sub Form_Load()
Drive1.Font.Name = "Technic"
Drive1.Font.Size = 12
End Sub

Of course you must have installed this font,
don't u have it?

greetings
+Oliver