473,651 Members | 2,775 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.devicen ame 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 15200

"kchengso" <kc******@hotma il.com> skrev i en meddelelse
news:41******** @news.starhub.n et.sg...
One of my printers in my printer.devicen ame 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("Testin g") ' A=TESTING

A=LCase("Testin g") ' A=testing

UCase = uppercase
LCase = lowercase

Jul 17 '05 #2
I forgot to mention that Printer.Devicen ame is a read-only property in VB.
Therefore
Printer.Devicen ame = UCase (Printer.Device name) is not a valid statement and
results in syntax error.
"Steen Gellett" <He*******@NoSp am.Net> wrote in message
news:41******** *************@d read12.news.tel e.dk...

"kchengso" <kc******@hotma il.com> skrev i en meddelelse
news:41******** @news.starhub.n et.sg...
One of my printers in my printer.devicen ame 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("Testin g") ' A=TESTING

A=LCase("Testin g") ' A=testing

UCase = uppercase
LCase = lowercase


Jul 17 '05 #3
"kchengso" <kc******@hotma il.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.Devicen ame is a read-only property in VB.
Therefore
Printer.Device name = UCase (Printer.Device name) 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*******@NoSp am.Net> wrote in message
news:41******* **************@ dread12.news.te le.dk...

"kchengso" <kc******@hotma il.com> skrev i en meddelelse
news:41******** @news.starhub.n et.sg...
> One of my printers in my printer.devicen ame 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("Testin g") ' A=TESTING

A=LCase("Testin g") ' 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******@hotma il.com> wrote in message
news:41******** @news.starhub.n et.sg...
I forgot to mention that Printer.Devicen ame is a read-only
property in VB. Therefore Printer.Devicen ame = UCase
(Printer.Device name) 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.Devicen ame. However, my intention is to change the
Printer.Devicen ame 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.Devicen ame will be in Upper Case instead of lower case.
This might seem trivial but it is made difficult as Printer.Devicen ame is a
read only property.
Appreciate your help.

"Mike Williams" <Mi**@WhiskyAnd Coke.com> wrote in message
news:cq******** *@news6.svr.pol .co.uk...
"kchengso" <kc******@hotma il.com> wrote in message
news:41******** @news.starhub.n et.sg...
I forgot to mention that Printer.Devicen ame is a read-only
property in VB. Therefore Printer.Devicen ame = UCase
(Printer.Device name) 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******@hotma il.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.Device name. However, my intention is to change the
Printer.Device name 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.Device name will be in Upper Case instead of lower case.
This might seem trivial but it is made difficult as Printer.Devicen ame 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*****@nowher e.uk> wrote in message
news:41******** ********@news.b tclick.com...
On Sat, 25 Dec 2004 09:24:13 +0800, "kchengso" <kc******@hotma il.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.Device name. However, my intention is to change the
Printer.Device name 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.Device name will be in Upper Case instead of lower case.
This might seem trivial but it is made difficult as Printer.Devicen ame 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******@hotma il.com> wrote in message
news:41******** @news.starhub.n et.sg...
Thanks for comments from Steen, Jan and Mike.
I am able to follow what Steen suggested to change the returned value of
Printer.Devicen ame. However, my intention is to change the
Printer.Devicen ame 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.Devicen ame will be in Upper Case instead of lower case.
This might seem trivial but it is made difficult as Printer.Devicen ame 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_US ER\Software\Mic rosoft\Windows
NT\CurrentVersi on\Windows\Devi ce
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
2578
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 the same reports to 3 different laserjets and to 3 different labelprinters. (They work with the db on 3 different units each with their own Laserjet and Labelprinter) For each unit there is a copy of all the reports. The client can make a unit...
4
50230
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. How do I send the out of a report, using VBA, to a specific printer? Michael Charney *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
3
3349
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 Access2003 loaded. The specific printer is a serial 24 pin dot matrix printer designed to produce wax stencils. Some of the PC have Com1 open others have Com2 open and others are using both Com Ports. I will have to purchase Serial to USB adapters to...
1
5450
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 changed, Access 2003 still directs the report to the former default printer. Access 2003 picks up the new default printer setting only after I have reopened the application. I have checked the default printer setting in the OS control panel and the...
1
6111
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 PRINTER_DEFAULTS Dim pinfo2 As PRINTER_INFO_2 Dim pinfo8 As PRINTER_INFO_8 Dim pinfo9 As PRINTER_INFO_9 Dim dm As DEVMODEW Dim yDevModeData() As Byte
2
17364
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. The following code will allow you to specify the printer that reports are sent to by reseting the systems default printer. Windows API/Global Declarations Public Declare Function WriteProfileString Lib "kernel32" Alias "WriteProfileStringA"...
0
1786
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 feed as the papersize is different. The following coding does select the printer that I require on my computer, but as different people have different printers loaded to their machines the number of printers and the orders vary, so my coding falls...
4
16797
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 Tip to these Topics. The Tip will actually consist of several Tips which I feel are very useful for all Users, from Newbies to Experts. In order to utilize the code contained within these Tips, you must have Access 2002 or later. How can I...
2
6700
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 of Chinese characters, on my machine I installed language pack and currently set language as Chinese PRC but still it's not working. Option Explicit Private Type DOCINFO pDocName As String pOutputFile As String pDatatype As String
0
8357
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8277
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8803
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8465
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8581
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7298
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6158
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2701
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1910
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.