开发者

C# PrintPreviewDialog - How to change a background?

开发者 https://www.devze.com 2023-03-16 18:22 出处:网络
I have a PrintPreviewDialog. By default, the document to be printed is being shown on the white sheet. Is it possible to change the background开发者_如何学Go from that white sheet to a custom image?

I have a PrintPreviewDialog. By default, the document to be printed is being shown on the white sheet. Is it possible to change the background开发者_如何学Go from that white sheet to a custom image?

EDIT

I've figured it out - I had to DrawImage on the PrintedDocument.


If check MDSN there is a back color property. But it is mentioned like

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

You can do something like inherit from PrintPreviewDialog, and try changing the back color property of the new class. (I am not sure its a good method or it will work or not)


I've figured it out - I had to DrawImage on the PrintedDocument.

0

精彩评论

暂无评论...
验证码 换一张
取 消