473,508 Members | 2,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Printer Devicename - Can Change to Upper Case?

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
8 15187

"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
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
"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
"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
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
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
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

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2556
by: Esmee | last post by:
Hi there, I have created an Access 2002 db which contains several reports. Some reports need to be printed on a Laserjet and others on a Labelprinter. One of my clients wants to be able to print...
4
50192
by: Nothing | last post by:
I have a form that I send to a printer. The workstation that is using the DB has more then one printer defined. The default is NOT the printer that I want to use for output from the report/form. ...
3
3336
by: 2D Rick | last post by:
I have multiple reports that use a "specific printer" because the default printer is tied up doing other chores. This is a machine shop environment using Dells' running Win2000 and XP with...
1
5427
by: i8mypnuts | last post by:
Could someone please help? I am using the 'defaultprt.zip' tool provided by Ken Getz to change the default printer via VBA code (code below). My problem is that once the default printer has been...
1
6092
by: sathyp | last post by:
Public Function SetPrinterDefaultsW(ByVal sPrinterName As String, _ ByVal nPaperSize As Long, ByVal nOrientation As Long) As Boolean Dim Prn As Printer Dim hPrinter As Long Dim pd As...
2
17313
sashi
by: sashi | last post by:
Set default printer You will often find yourself in a position where you have designed a report format for one printer and when that report is sent to another printer the layout is messed up. ...
0
1775
AllusiveKitten
by: AllusiveKitten | last post by:
Hi kind and helpful people... At work I am creating a database and reports that will be used by multiple people. What I need is for my reports to print to a specific colour printer and be manual...
4
16776
ADezii
by: ADezii | last post by:
Recently, there seems to be several questions specifically related to Printers and changing Printing characteristics for Forms and Reports. For this reason alone, I decided to dedicate this week's...
2
6679
by: Flying Kite | last post by:
Hi All, I want to know how to print chinese characters on Zebra Printer, following code working fine with English string, but it's not working for Chinese string. It shows ASCII characters instead...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7114
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7321
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7377
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7034
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7488
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5045
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.