473,473 Members | 2,277 Online
Bytes | Software Development & Data Engineering Community
Create 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 6418
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*******@yahoo.co.inwrote in message
news:11**********************@i3g2000cwc.googlegro ups.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*******@yahoo.co.inwrote in message
news:11**********************@i3g2000cwc.googlegro ups.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*******@yahoo.co.inwrote in message
news:11**********************@i3g2000cwc.googlegr oups.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.Printing.PrintPageEventArgs) Handles
PrintDocument1.PrintPage
e.Graphics.DrawImage(Me.Print_ImageF, 0, 0)
e.HasMorePages=True
e.Graphics.DrawImage(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.EventArgs) 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.Printing.PrintPageEventArgs) Handles
PrintDocument1.PrintPage

If page = 1 Then
e.Graphics.DrawImage(Me.Print_ImageF, 0, 0)
ElseIf page = 2 Then
e.Graphics.DrawImage(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.DoEvents()
Me.Refresh()
Application.DoEvents()
'Get a Graphics Object from the form
Dim FormGF As Graphics = gbFront.CreateGraphics
'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.FromImage(iFront)

'get the IntPtr's of the graphics
Dim HDC1 As IntPtr = FormGF.GetHdc
Dim HDC2 As IntPtr = memGFront.GetHdc
'get the picture
BitBlt(HDC2, 0, 0, gbFront.ClientRectangle.Width,
gbFront.ClientRectangle.Height, HDC1, 0, 0, 13369376)
'Clone the bitmap so we can dispose this one
Me.Print_ImageF = iFront.Clone()
'Clean Up
FormGF.ReleaseHdc(HDC1)
memGFront.ReleaseHdc(HDC2)
FormGF.Dispose()
memGFront.Dispose()
iFront.Dispose()

Dim FormGB As Graphics = gbBack.CreateGraphics
Dim iBack As New Bitmap(gbBack.Width, gbBack.Height,
FormGB)
Dim memGBack As Graphics = Graphics.FromImage(iBack)

Dim HDC3 As IntPtr = FormGB.GetHdc
Dim HDC4 As IntPtr = memGBack.GetHdc
'get the picture
BitBlt(HDC4, 0, 0, gbBack.ClientRectangle.Width,
gbBack.ClientRectangle.Height, HDC3, 0, 0, 13369376)
'Clone the bitmap so we can dispose this one
Me.Print_ImageB = iBack.Clone()
'Clean Up
FormGB.ReleaseHdc(HDC3)
memGBack.ReleaseHdc(HDC4)
FormGB.Dispose()
memGBack.Dispose()
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*******@yahoo.co.inwrote in message
news:11**********************@i3g2000cwc.googlegro ups.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
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...
5
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...
0
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...
1
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...
0
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...
1
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...
7
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...
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...
1
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...
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,...
1
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.