简体   繁体   中英

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

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 ie 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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM