i want to print my receipt in A4 size, but the problem is when i tried to print preview the form that need to be print , it occupy the whole paper. I use Word in printing.

and here's my code in print preview

    Private Sub frmreceipt_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
        Me.PrintForm1.PrintAction = Printing.PrintAction.PrintToPreview
        Me.PrintForm1.Print()
    End Sub

O.K so you want to print the whole form to A4 or part of it? So how big is the form -whole screen, part of the screen? How much space should it occupy on A4? The difficulty with using print form is that your screen resolution is different to the printer resolution. The easiest way is to change the size of the form to fit exactly what you want, but is maybe not possible. So without knowing exactly what you want it is hard to give any advice.

size of the form : 436, 607
i want to print the whole form and it occupy half of the paper.
like what you said, i change the size of my form. And yeah, i got what i want. My problem now is, is the size of that form will be the same as A4?

i also got another idea, instead of occupying the whole paper like A4, i want the receipt size like the form size, so i change the size into small one now, Actually my text size is 8, it's small now, but it still a half size of the paper. Is there a way where the size of the form like for example 436, 607 and when i print preview it in the paper it will decrease it size that only 1/4 of the paper will occupy?

One way of doing it is to capture your form into memory as a bitmap, resize the bitmap and than print it. That might make the font too small?

ok thanks,ive got an idea now

but i got a question again,how can i set size of the form to A4 in the paper?, this time it needs to occupy the whole paper?

Well if you want the form to fit into A4 you need to find the size of the form on screen and print to preview. Trial and error. These are good starting values to put into the form load event:

 Me.Width = CInt(595)
 Me.Height = CInt(842)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.