473,837 Members | 1,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Print ID card using Plastic Card Printer in VB.net

Hello friends,

I want to print an ID card. I have one Windows Form that contains front

and back side. The printer is printing both front and back side at a
time. I am trying to send both sides at a time. But it is printing
front side on one card and back side on second card. I want to print
both sides in a same card.
Thanks in advance.
Regards,
Raman.

Jul 29 '06 #1
5 6501
Hello Raman,

Perhaps you should contact the manufacturer of that printer.

Best Regards,

HKSHK

Raman wrote:
Hello friends,

I want to print an ID card. I have one Windows Form that contains front

and back side. The printer is printing both front and back side at a
time. I am trying to send both sides at a time. But it is printing
front side on one card and back side on second card. I want to print
both sides in a same card.
Thanks in advance.
Regards,
Raman.
Jul 29 '06 #2
We would need way more info then that about it... whats the printer mfg?
model? have you contacted them about it?

"Raman" <ra*******@yaho o.co.inwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.com...
Hello friends,

I want to print an ID card. I have one Windows Form that contains front

and back side. The printer is printing both front and back side at a
time. I am trying to send both sides at a time. But it is printing
front side on one card and back side on second card. I want to print
both sides in a same card.
Thanks in advance.
Regards,
Raman.

Jul 29 '06 #3
Yes, i have contacted about it.

Manufacture : Dualys
Printer specification : Module for dual sided printing
Integrated ribbon saver for monochrome
printing
printer speed : 150 cards/hour
resolution : 300 dpi

It is operated as printing both sides at a time. It takes automatically
when u send 2 pages for printing. I have send a word document with 2
pages. It takes first page as a front end and second page as back end.
What is my problem is i have designed a windows form. It contains 2
frames one is for front side another for back. I want to send both
frames at a time to printer when a button is clicked

Smokey Grindle wrote:
We would need way more info then that about it... whats the printer mfg?
model? have you contacted them about it?

"Raman" <ra*******@yaho o.co.inwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.com...
Hello friends,

I want to print an ID card. I have one Windows Form that contains front

and back side. The printer is printing both front and back side at a
time. I am trying to send both sides at a time. But it is printing
front side on one card and back side on second card. I want to print
both sides in a same card.
Thanks in advance.
Regards,
Raman.
Jul 31 '06 #4
Hello Raman,
>>I want to print an ID card. I have one Windows Form that contains front

and back side. The printer is printing both front and back side at a
time. I am trying to send both sides at a time. But it is printing
front side on one card and back side on second card. I want to print
both sides in a same card.
Did you send both sides with one print job? I would expect that if you
send both sides separately that it takes it as 2 cards.

Best Regards,

HKSHK

Raman wrote:
Yes, i have contacted about it.

Manufacture : Dualys
Printer specification : Module for dual sided printing
Integrated ribbon saver for monochrome
printing
printer speed : 150 cards/hour
resolution : 300 dpi

It is operated as printing both sides at a time. It takes automatically
when u send 2 pages for printing. I have send a word document with 2
pages. It takes first page as a front end and second page as back end.
What is my problem is i have designed a windows form. It contains 2
frames one is for front side another for back. I want to send both
frames at a time to printer when a button is clicked

Smokey Grindle wrote:
>We would need way more info then that about it... whats the printer mfg?
model? have you contacted them about it?

"Raman" <ra*******@yaho o.co.inwrote in message
news:11******* *************** @i3g2000cwc.goo glegroups.com.. .
>>Hello friends,

I want to print an ID card. I have one Windows Form that contains front

and back side. The printer is printing both front and back side at a
time. I am trying to send both sides at a time. But it is printing
front side on one card and back side on second card. I want to print
both sides in a same card.
Thanks in advance.
Regards,
Raman.
Jul 31 '06 #5
Hello HKSHK,

Please help me out from this problem

I have 2 frames in windows form. From that i have created 2 bitmap
images.
When i call use this function only back side is printed and card is
strucked in the printer. But two pages are send to printer. but second
image is overwritted on frirst image. So second page does not contain
any thing.

Private Sub PrintDocument1_ PrintPage(ByVal sender As Object, ByVal e
As Drawing.Printin g.PrintPageEven tArgs) Handles
PrintDocument1. PrintPage
e.Graphics.Draw Image(Me.Print_ ImageF, 0, 0)
e.HasMorePages= True
e.Graphics.Draw Image(Me.Print_ ImageB, 0, 0)
End Sub

or

When i use this function both front side and back side is printed. but
both are printed in different card.
Private Sub btnPrint_Click( ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnPrint.Click

page=1 ' Vriable to represent which page
For i = 1 To 2
PrintDocument1. Print() 'Print the document
page = page + 1
Next
End Sub

Private Sub PrintDocument1_ PrintPage(ByVal sender As Object, ByVal e
As Drawing.Printin g.PrintPageEven tArgs) Handles
PrintDocument1. PrintPage

If page = 1 Then
e.Graphics.Draw Image(Me.Print_ ImageF, 0, 0)
ElseIf page = 2 Then
e.Graphics.Draw Image(Me.Print_ ImageB, 0, 0)
End If

End Sub


I have created these two images by following coding in btnPrint_Click
function. It is created before the print command is called.

'We make the form look pritty befor its picture
Application.DoE vents()
Me.Refresh()
Application.DoE vents()
'Get a Graphics Object from the form
Dim FormGF As Graphics = gbFront.CreateG raphics
'Create a bitmap from that graphics
Dim iFront As New Bitmap(gbFront. Width, gbFront.Height,
FormGF)
'Create a Graphics object in memory from that bitmap
Dim memGFront As Graphics = Graphics.FromIm age(iFront)

'get the IntPtr's of the graphics
Dim HDC1 As IntPtr = FormGF.GetHdc
Dim HDC2 As IntPtr = memGFront.GetHd c
'get the picture
BitBlt(HDC2, 0, 0, gbFront.ClientR ectangle.Width,
gbFront.ClientR ectangle.Height , HDC1, 0, 0, 13369376)
'Clone the bitmap so we can dispose this one
Me.Print_ImageF = iFront.Clone()
'Clean Up
FormGF.ReleaseH dc(HDC1)
memGFront.Relea seHdc(HDC2)
FormGF.Dispose( )
memGFront.Dispo se()
iFront.Dispose( )

Dim FormGB As Graphics = gbBack.CreateGr aphics
Dim iBack As New Bitmap(gbBack.W idth, gbBack.Height,
FormGB)
Dim memGBack As Graphics = Graphics.FromIm age(iBack)

Dim HDC3 As IntPtr = FormGB.GetHdc
Dim HDC4 As IntPtr = memGBack.GetHdc
'get the picture
BitBlt(HDC4, 0, 0, gbBack.ClientRe ctangle.Width,
gbBack.ClientRe ctangle.Height, HDC3, 0, 0, 13369376)
'Clone the bitmap so we can dispose this one
Me.Print_ImageB = iBack.Clone()
'Clean Up
FormGB.ReleaseH dc(HDC3)
memGBack.Releas eHdc(HDC4)
FormGB.Dispose( )
memGBack.Dispos e()
iBack.Dispose()


HKSHK wrote:
Hello Raman,
>>I want to print an ID card. I have one Windows Form that contains front
>>>
>>and back side. The printer is printing both front and back side at a
>>time. I am trying to send both sides at a time. But it is printing
>>front side on one card and back side on second card. I want to print
>>both sides in a same card.

Did you send both sides with one print job? I would expect that if you
send both sides separately that it takes it as 2 cards.

Best Regards,

HKSHK

Raman wrote:
Yes, i have contacted about it.

Manufacture : Dualys
Printer specification : Module for dual sided printing
Integrated ribbon saver for monochrome
printing
printer speed : 150 cards/hour
resolution : 300 dpi

It is operated as printing both sides at a time. It takes automatically
when u send 2 pages for printing. I have send a word document with 2
pages. It takes first page as a front end and second page as back end.
What is my problem is i have designed a windows form. It contains 2
frames one is for front side another for back. I want to send both
frames at a time to printer when a button is clicked

Smokey Grindle wrote:
We would need way more info then that about it... whats the printer mfg?
model? have you contacted them about it?

"Raman" <ra*******@yaho o.co.inwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.com...
Hello friends,

I want to print an ID card. I have one Windows Form that contains front

and back side. The printer is printing both front and back side at a
time. I am trying to send both sides at a time. But it is printing
front side on one card and back side on second card. I want to print
both sides in a same card.
Thanks in advance.
Regards,
Raman.
Aug 1 '06 #6

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

Similar topics

1
4923
by: Geert-Pieter Hof | last post by:
Hello, I'm using the Printer.PaintPicture method to print an image and I want to set the job title that the print manager will show. I already found out that this can be done by using the StartDoc API function. However, I can't figure out how to set the job title by API and do the printing of the image without using API but by using the Printer.PaintPicture method.
5
13385
by: MouseHart | last post by:
I've written a simple program in VB 6.0 to list all my MP3 files. To show them on the screen I used an MSFlexGrid named TextGrid (which is not associated with any table or text file) in the following code run by a button (the files are all in the format "Artist - Name Of Song" in their directories, which is why the code looks for a dash): Private Sub Command1_Click() Dim dashplace%, length% For I% = 0 To File1.ListCount FLIName =...
0
3291
by: KohlerTommy | last post by:
In my application I need to give the user the ability to print duplex if the selected printer supports duplex printing. Many of the printer options do not make much sense in my application, and many of the settings in the common printer dialog would have a negative impact on my printing process. To handle this strict printing constraint on which my application imposes I do not want to show the common print dialog. I want to be able to...
1
7058
by: Jason | last post by:
For some reason, most but not all reports printing from an access application our client is using will not print any images on the reports or forms. One report will print the image and data correctly oddly enough. The image header is embedded using the Insert Image feature and not loaded into a database. I can move the image to anywhere in the report and still it will not print out. I've loaded the most recent printer drivers and...
0
3260
by: Tessa | last post by:
Is there any security reason why you cannot print to a network printer from ASP.NET under IIS6 on Windows 2003 server? I'm using ASP.NET code to print to a server print queue using PrintDocument.Print() (.NET framework v 1.1) I can print to a local printer plugged into LPT1 on the web server, but not to a network printer. The same printing code to a network printer works in a .NET web app when
1
10827
by: Michael Beck | last post by:
I need to select one of about 15 printers, which I have been able to do. Then I need to set that printer as the printer to use, run a Crystal Reports reports, and track if/when the printing job completes. Is there a book or article that can help me? If it is fairly easy, can anyone sen me some code that will get me started. TIA,
7
20739
by: Mark | last post by:
Hi, I am creating application in VB 2005. and when I print report it adds extra 0.45 cm margin on left and top, and the reason for this is physical margins of printer. Is it possible to change printer's physical margins using VB coding? Cheers -- Osmotion Blue
24
2848
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 with the printer that i am printing to(Zebra TLP2844). When i open Word and look at the fonts available for the default printer, it does not show the fonts i want. If i cahnge the printer to the printer that
1
5423
by: Mo | last post by:
Hi, I have two tiff images which present the front and back of a card. I need to send these to images to a printer that has a two sided printing capabilities. I need to send these two images to the print as page 1 and two of the same document in order for the printer to print it on the front and back of the document. how do you combine these images so that they present page 1 and 2 of a document for printing? The following code shows how...
0
9693
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
10638
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
10280
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
9419
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
7824
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
5680
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
5862
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4481
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
4058
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.