Is it possible to print a windows form from set X,Y coordinates

332 Views Asked by At

I am able to print the entire windows form but the top of the printout is not necessary. Is there a way to print from specific coordinates i.e X = 0 Y = 50.

This is the code i use to print the entire form.

    private void btn_Print_Click(object sender, EventArgs e)
    {
        printForm1.PrintAction = PrintAction.PrintToPreview;
        printForm1.Print();
    }

Thanks in advance.

1

There are 1 best solutions below

0
On BEST ANSWER

You could use DrawToBitmap method, to get a screenshot of your form. Then edit a bitmap and send it to printer.