473,404 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

print to printer using visual basic

1
I am trying to print text to a docket printer with the following command
printer.print "trying to print"
but I keep getting an error.
Actually I want to print special keys so that the cah draw opens. I first need to know that the print commands work. If I can specify the printer as well it would be great.
I have tried
pinter.print Chr$(27);Chr$(0);Char$(80);Chr$(80)
but this doesnt work in opening the draw. The printer doesn't respond at all.
The error I get is
The expression on Click you entered as the event property setting produced the following error:
Object doesn't support this property or method.
Any help would be welcome.
Mar 28 '08 #1
2 2340
epots9
1,351 Expert 1GB
Moved to the VB Forums where the resident experts can better assist you.

**Moved from Programming Challenges.
Mar 28 '08 #2
Hi,

I have a simple VB6 code here.

Set prn = Printers(0)
Debug.Print prn.DeviceName
prn.Print "Hello" ' I am getting Run-time error 438 here. Object doesn't support this property or method.

Can you please help with this? I am struggling on this for many hours.

Thanks and regards
rcm
Jan 18 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Soumya Kar | last post by:
Hi All, My requirement is to be able to print a pdf document without the printer dialog being invoked. This I have achieved by using the shell and passing the verb = "Print". But a part of the...
7
by: bclegg | last post by:
Hi, I have a Monitoring application that needs to output single line summaries to a local dot matrix printer loaded with line flow. ie. It will have exclusive use of the printer which is connected...
12
by: Peter Lin | last post by:
Hey, I am just wondering if anyone has got any idea of setting up a new class so that you could just print like the old ways with the printer class, since I am writing a program that really...
3
by: Jeff Mason | last post by:
Hi, I'm looking for a component or code which will allow me to print an existing PDF file from a VB.NET app. I need the ability to specify the PDF file and the printer name on which it is to...
9
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...
1
by: DeWittds | last post by:
I have been tring to recreate a simple program that I wrote many years ago in quick basic. The program get name and address from a database, then the user will enter in info like order #, po # and...
4
by: DeWittds | last post by:
Had no luck in the visual basic group maybe someone here can give me a hand. I have been tring to recreate a simple program that I wrote many years ago in quick basic. The program get name and...
24
by: Tony Girgenti | last post by:
Hello. Developing a Windows Form program in VS.NET VB, .NET Framework 1.1.4322 on a windows XP Pro, SP2. Before printing a document, i want to set the font to a font that is only available...
0
by: neeraj | last post by:
Hi all I have developed on desktop application in Visual Basic for Hotel Management and my client requires multiple printing options here I have multiple printers first default printer which...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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
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...
0
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,...
0
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...

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.