VB.NET - I want to make a cheque printing software

Asked By Ajay Chhadwa on 03-Sep-11 06:39 AM
i want 2 make a cheque printing software
in vc# 08 and backend sql 2005
i am new
can u help me with proper specific detail and coding in c# (vb.net)
Web Star replied to Ajay Chhadwa on 03-Sep-11 06:52 AM
The only matter is position for cheque print , so better is you can just get photocopy of cheque and than try to print on that with specified text with specified position .
Radhika roy replied to Ajay Chhadwa on 03-Sep-11 07:54 AM

you can use PrintDocument object.

Here are some documentation and samples
http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument(VS.71).aspxhttp://blogs.techrepublic.com.com/programming-and-development/?p=502
http://www.expvice.com/code.aspx?id=24


http://www.vbforums.com/showthread.php?t=627051

Printing in VB.NET
Use crystal report or Microsoft Report.
dipa ahuja replied to Ajay Chhadwa on 03-Sep-11 07:58 AM
For that first you have to design the form which should have the proper design for the cheque

and for printing you have option of crystal report.

You may required a table with proper required fields in you table..

if have any problem then free to ask..
Jitendra Faye replied to Ajay Chhadwa on 03-Sep-11 11:02 AM
Using PrintForm.Print() You can complete this task.

design your form , as you want in cheque format.

after that PrintForm.Print() method.

To print the entire form, perform the following steps:

  1. Drag a PrintForm component onto your Form from the Visual Studio Toolbox
  2. Set the PrintForm.BodyContainer property to reference your Form
  3. Add a button and button click handler. In the handler call PrintForm.Print()

Try this and let me know.
Radhika roy replied to Ajay Chhadwa on 03-Sep-11 11:34 AM

Here are two approaches to print a form in http://vb.net/:


1) Using PrintDocument, PrintDialog components

.NET Framework provides excellent support for printing documents.

PrintDocument Component:

In .NET Framework, a printed document is represented by the PrintDocument component. The PrintDocument object encapsulates all the information needed to print a page. It handles the events and operations of printing.

 

PrintDialog Component:

To print a document, you need to set the PrintDialog’s Document property to the PrintDocument object, and use the PrintDocument object's Print method. To send content to the printer, you must handle this PrintDocument_PrintPage event to render the content.

Private Sub buttonPrint_Click(ByVal sender As Object, ByVal e As System.EventArgs) Dim printDialog1 As PrintDialog = New PrintDialog printDialog1.Document = printDocument1 Dim result As DialogResult = printDialog1.ShowDialog If (result = DialogResult.OK) Then printDocument1.Print() End If End Sub 

 

Code sample: How to use PrintDocument component to Print multiline and scrollable TextBox in http://vb.net/.
http://social.msdn.microsoft.com/Forums/en-US/vbpowerpacks/thread/2ad34554-e989-4ffa-8e1f-ccea1f00c99d


Some tutorials:


Article: Printing feature in .NET Framework

http://www.startvbdotnet.com/controls/printdialog.aspx


Windows Forms Printing

http://www.syncfusion.com/faq/windowsforms/faq_c55c.aspx#q491q


How to print the content of RichTextBox using Visual Basic .NET?

http://support.microsoft.com/kb/811401

 

2) Using PrintForm component in Visual Basic Power Packs

The PrintForm component is designed to bring back the ability to easily print a Windows Form. This makes it possible to layout the Windows Form exactly as you want and also allows you to print the form as a quick report.

 

Microsoft Visual Basic Power Packs 3.0 Download

http://msdn.microsoft.com/en-us/vbasic/bb735936.aspx

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click PrintForm1.Print(Me, PowerPacks.Printing.PrintForm.PrintOption.Scrollable) End Sub 
hope this will help u
Devil Scorpio replied to Ajay Chhadwa on 03-Sep-11 11:49 AM
Hi Ajay,

You can create cheque printing software by using PrintDocument component in VB.net

If you want to allow users to print form components in run-time, the PrintDocument component lets you offer users this functionality. The PrintDocument component is an object that allows users to send an output to a printer from Windows Forms applications. In this tip, I show you how to use the component in your VB.NET applications.

Using PrintDocument

In order to use the PrintDocument component, you need to double-click on the PrintDocument component in the Toolbox. Once the component is added to the form, you can set its properties and print.

In my example, I will add the PrintDocument component, a TextBox, and a command button to the form. Then, I will add the following code:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click    

     PrintDocument1.PrinterSettings.Copies = 2
     PrintDocument1.Print()    

 End Sub