473,722 Members | 2,468 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 1757
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
4057
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
15036
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
21686
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
2364
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
1812
by: Claudio | last post by:
Is there a way to write directly to a dotmatrix printer using C#?
14
2473
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
28019
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
1084
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
9672
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
8867
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
8740
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
9386
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
9158
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,...
1
6685
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
5996
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4503
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
4764
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3208
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

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.