473,698 Members | 1,883 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to determin is the selected printer a dot-matrix

I am interesting how to determin is the selected printer a dot-matrix
printer or is it a laser printer

What property is relevant to detrmin what type is selected printer
Nov 20 '05 #1
1 1756
Hi,

You can use the win32_printer classes markingtechnolo gy property to find
out what type of printer you have. Add a reference to system.manageme nt

Dim moReturn As Management.Mana gementObjectCol lection

Dim moSearch As Management.Mana gementObjectSea rcher

Dim mo As Management.Mana gementObject

moSearch = New Management.Mana gementObjectSea rcher("Select * from
Win32_Printer")

moReturn = moSearch.Get

For Each mo In moReturn

Dim intMarking As Integer = CType(mo("Marki ngTechnology"). ToString, Integer)

If intMarking >= 6 And intMarking <= 8 Then

Debug.WriteLine (mo("Name"))

End If

Next
http://msdn.microsoft.com/library/de...32_printer.asp

Ken
--------------------------
"Tancev Sasa" <ts***@gu.ni.sr .gov.yu> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
I am interesting how to determin is the selected printer a dot-matrix
printer or is it a laser printer

What property is relevant to detrmin what type is selected printer

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4053
by: RC | last post by:
In my vba code I use do.cmd printout to send a report to a printer. The report is set to use a specific printer not the default printer. Sometimes the report seems to not go to the specified printer. Is there a way to specify the printer in the code?
5
7119
by: Hank | last post by:
My Access 2000 code has been running for several years in our main plant. Now we need to install it, as a stand-along application, at remote sites, some of which are out of state. My problem is the printer destination for special reports such as stickers and mailing labels. The Mailing Label report is, of course, designed here for a specific printer (Mailing Label). At another site, the name could be completely different. Other than...
3
15035
by: giloosh99 | last post by:
Hello I have a report that needs to printed by a specific printer rather than the computers default printer? Is there a way to dynamically choose a specific printer to print a report through VBA code? I know that in the report's page setup you could choose a specific printer to print from in the page setup but that is not enough for my needs. I need to be able to dynamically choose a printer through code. Is there a way? Any help will...
13
21676
by: Susan Beebe | last post by:
I have downloaded the code described in Microsoft article Q154078. I am trying to send raw ZPL (zebra barcode printer) code from Microsoft access. It works just fine if I hard code the actual data in the string being sent to the printer. However, if I prompt the user for data or if I insert data from a particular record/field in a form Access crashes/closes on its own. I have included the code below, if anyone has any suggestions,...
1
2362
by: groulder | last post by:
hi all, i have a problem with a network database that's used by a lot of people. people are finding, they will start the database, and if the mouse is moved over the print icon, the tooltip appears to show which printer it will print to as normal. this printer however is a printer that the user doesn't even have installed.
3
1809
by: Claudio | last post by:
Is there a way to write directly to a dotmatrix printer using C#?
14
2472
by: Claudio | last post by:
I asked if there was a way to print directly to a dotmatrix printer. The answer was yes, but I need to know how to do it.
9
28006
spider1916
by: spider1916 | last post by:
I am using the common dialog control to allow my users to select any printer available to them. The code I am using keeps changing the selected printer to the default printer............I don't want that. I can't find anything with a propar salution to my problem. I JUST WANT TO PRINT A REPORT!!!!!!! No setting needs to be changed, ever. I only want to get the selected printer from the dialog and print to it. This seems to allow me...
0
1083
by: swaroopgadekar | last post by:
Please tell me how can i print the selected text matter of a crystal report in WINDOWS APPLICATION, on a pre printing stationary EX: --------------------------------------------------------------------------------------------- SWAROOP INDUSTRIES LIMITED dhankawadi, Pune. ...
3
9644
by: jpas84 | last post by:
When using JavaScript window.print() command to print in IE, is it possible to set the selected printer in the Print window? In some cases I'd like to have the user's default printer selected, and in other cases have a specific printer selected when the Print window is displayed. The default behavior seems to be that the first time the Print window is displayed, the default printer is selected. After that, the last selected printer is the...
0
8601
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,...
1
8892
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
8860
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
7716
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
6518
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...
0
4365
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4614
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3043
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
2
2327
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.