By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,369 Members | 1,230 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,369 IT Pros & Developers. It's quick & easy.

Printer Devicename - Can Change to Upper Case?

P: n/a
One of my printers in my printer.devicename call returns in lower case. Is
it possible for me to change it to upper case? I am also wondering how, in
the first place, this particular printer devicename is coded in lower case?
Is there a way to change it back using VB6?
Thanks
Jul 17 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a

"kchengso" <kc******@hotmail.com> skrev i en meddelelse
news:41********@news.starhub.net.sg...
One of my printers in my printer.devicename call returns in lower case. Is
it possible for me to change it to upper case? I am also wondering how, in
the first place, this particular printer devicename is coded in lower
case?
Is there a way to change it back using VB6?
Thanks
A=UCase("Testing") ' A=TESTING

A=LCase("Testing") ' A=testing

UCase = uppercase
LCase = lowercase

Jul 17 '05 #2

P: n/a
I forgot to mention that Printer.Devicename is a read-only property in VB.
Therefore
Printer.Devicename = UCase (Printer.Devicename) is not a valid statement and
results in syntax error.
"Steen Gellett" <He*******@NoSpam.Net> wrote in message
news:41*********************@dread12.news.tele.dk. ..

"kchengso" <kc******@hotmail.com> skrev i en meddelelse
news:41********@news.starhub.net.sg...
One of my printers in my printer.devicename call returns in lower case. Is it possible for me to change it to upper case? I am also wondering how, in the first place, this particular printer devicename is coded in lower
case?
Is there a way to change it back using VB6?
Thanks


A=UCase("Testing") ' A=TESTING

A=LCase("Testing") ' A=testing

UCase = uppercase
LCase = lowercase


Jul 17 '05 #3

P: n/a
"kchengso" <kc******@hotmail.com>'s wild thoughts were
released on Fri, 24 Dec 2004 17:38:57 +0800 bearing the
following fruit:
I forgot to mention that Printer.Devicename is a read-only property in VB.
Therefore
Printer.Devicename = UCase (Printer.Devicename) is not a valid statement and
results in syntax error.
Steen was just pointing out that once you have the printer
name, you can do what you like with it.

Why are you bothered about the case anyway?

J


"Steen Gellett" <He*******@NoSpam.Net> wrote in message
news:41*********************@dread12.news.tele.dk ...

"kchengso" <kc******@hotmail.com> skrev i en meddelelse
news:41********@news.starhub.net.sg...
> One of my printers in my printer.devicename call returns in lower case.Is > it possible for me to change it to upper case? I am also wondering how,in > the first place, this particular printer devicename is coded in lower
> case?
> Is there a way to change it back using VB6?
> Thanks


A=UCase("Testing") ' A=TESTING

A=LCase("Testing") ' A=testing

UCase = uppercase
LCase = lowercase
>
>


Jan Hyde (VB MVP)

--
“Deck the halls with Buddy Holly” (Richard Lederer)

[Abolish the TV License - http://www.tvlicensing.biz/]

Jul 17 '05 #4

P: n/a
"kchengso" <kc******@hotmail.com> wrote in message
news:41********@news.starhub.net.sg...
I forgot to mention that Printer.Devicename is a read-only
property in VB. Therefore Printer.Devicename = UCase
(Printer.Devicename) is not a valid statement . . .


Steen wasn't suggesting that you attempt to change the DeviceName (using
Ucase or anything else). What he was telling you is that you can change the
*returned* devicename so that the case is whatever you want it to be. I
can't see why you would want to actually change the device name itself. It
is almost certainly possible to do so from VB, but it's not really worth us
bothering to look into that unless you have a pressing reason to need to do
so.

Personally, I don't place too much reliance on device names simply because
it may actually be something other than you might expect, and in some cases
almost totally meaningless. If you want to print something that you know can
only be done on a specific printer (and if you want to know whether a
printer with such capabilities is attached) then I would suggest you check
its capabilities rsather than its device name.

If you really want to change it (and you don't want to bother looking for a
suitable VB method) then you can always use the Control Panel Printers
applet to do so.

Mike


Jul 17 '05 #5

P: n/a
Thanks for comments from Steen, Jan and Mike.
I am able to follow what Steen suggested to change the returned value of
Printer.Devicename. However, my intention is to change the
Printer.Devicename itself to Upper Case and to write it back into the Window
Registry, so that the next time I call it, the returned value of the
Printer.Devicename will be in Upper Case instead of lower case.
This might seem trivial but it is made difficult as Printer.Devicename is a
read only property.
Appreciate your help.

"Mike Williams" <Mi**@WhiskyAndCoke.com> wrote in message
news:cq*********@news6.svr.pol.co.uk...
"kchengso" <kc******@hotmail.com> wrote in message
news:41********@news.starhub.net.sg...
I forgot to mention that Printer.Devicename is a read-only
property in VB. Therefore Printer.Devicename = UCase
(Printer.Devicename) is not a valid statement . . .
Steen wasn't suggesting that you attempt to change the DeviceName (using
Ucase or anything else). What he was telling you is that you can change

the *returned* devicename so that the case is whatever you want it to be. I
can't see why you would want to actually change the device name itself. It
is almost certainly possible to do so from VB, but it's not really worth us bothering to look into that unless you have a pressing reason to need to do so.

Personally, I don't place too much reliance on device names simply because
it may actually be something other than you might expect, and in some cases almost totally meaningless. If you want to print something that you know can only be done on a specific printer (and if you want to know whether a
printer with such capabilities is attached) then I would suggest you check
its capabilities rsather than its device name.

If you really want to change it (and you don't want to bother looking for a suitable VB method) then you can always use the Control Panel Printers
applet to do so.

Mike

Jul 17 '05 #6

P: n/a
On Sat, 25 Dec 2004 09:24:13 +0800, "kchengso" <kc******@hotmail.com>
wrote:
Thanks for comments from Steen, Jan and Mike.
I am able to follow what Steen suggested to change the returned value of
Printer.Devicename. However, my intention is to change the
Printer.Devicename itself to Upper Case and to write it back into the Window
Registry, so that the next time I call it, the returned value of the
Printer.Devicename will be in Upper Case instead of lower case.
This might seem trivial but it is made difficult as Printer.Devicename is a
read only property.
Appreciate your help.


Surely the DeviceName is immediately supplied by the Printer Driver
- admittedly, the driver will have fished it out from Windows
- and ultimatetely the 'DeviceName' will have come from another driver

Does it matter if it is upper or lower case ?
Jul 17 '05 #7

P: n/a
Many thanks.
I have managed to solve the problem after reading deeper into what Mike and
J suggested.
Thanks for all your times.

"J French" <er*****@nowhere.uk> wrote in message
news:41****************@news.btclick.com...
On Sat, 25 Dec 2004 09:24:13 +0800, "kchengso" <kc******@hotmail.com>
wrote:
Thanks for comments from Steen, Jan and Mike.
I am able to follow what Steen suggested to change the returned value of
Printer.Devicename. However, my intention is to change the
Printer.Devicename itself to Upper Case and to write it back into the WindowRegistry, so that the next time I call it, the returned value of the
Printer.Devicename will be in Upper Case instead of lower case.
This might seem trivial but it is made difficult as Printer.Devicename is aread only property.
Appreciate your help.


Surely the DeviceName is immediately supplied by the Printer Driver
- admittedly, the driver will have fished it out from Windows
- and ultimatetely the 'DeviceName' will have come from another driver

Does it matter if it is upper or lower case ?

Jul 17 '05 #8

P: n/a

"kchengso" <kc******@hotmail.com> wrote in message
news:41********@news.starhub.net.sg...
Thanks for comments from Steen, Jan and Mike.
I am able to follow what Steen suggested to change the returned value of
Printer.Devicename. However, my intention is to change the
Printer.Devicename itself to Upper Case and to write it back into the Window Registry, so that the next time I call it, the returned value of the
Printer.Devicename will be in Upper Case instead of lower case.
This might seem trivial but it is made difficult as Printer.Devicename is a read only property.
Appreciate your help.

This is indeed a registry setting under current version\Windows\Device. For
example, on W2K, this is at
HKEY_CURRENT_USER\Software\Microsoft\Windows
NT\CurrentVersion\Windows\Device
Just watch the rest of it, for example, the spooler and the port is also
recorded.
I strongly recommend *against* dinkin' around with this..
Jul 17 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.