문제

HI all,

I have a picture box in my C# WinForms application which is sized 800x800. I want to print the content of this picture box using the following code but it does not do anything at all (just shows the print dialog and when I click on PRINT in the dialog it doe nothing too. What's wrong?

    private void menuFilePrint_Click(object sender, EventArgs e)
    {
        printDocument.OriginAtMargins = true;
        printDocument.DocumentName = "TEST IMAGE PRINTING";

        printDialog.Document = printDocument;
        printDialog.ShowDialog();
    }

    private void printDocument_PrintPage(object sender, PrintPageEventArgs e)
    {
        e.Graphics.DrawImage(curveBox.Image, 0, 0);
    }

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top