急需帮助尽快! [英] Urgent help required ASAP Please!!!

查看:95
本文介绍了急需帮助尽快!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我最近在表单上添加了一些代码,用于调整Print上的图像大小。我有一个图像,它在调整大小后可以正确打印,但我需要将它用作背景图像,它将在其前面写入可变文本。我无法打印要打印的标签和文本框,以及正在打印的过大图像。标签和文本框需要出现在图像的正面。


我在哪里放置必要的代码?


请帮助!!迫切需要!


我的代码目前看起来像这样:


Private Sub cmdPrint_Click()

Printer.PaperSize = 3


''打印Picture1中加载的图像(双倍大小)

PrintImage Image1.Picture ,, 1#


End Sub

------------------------------


''打印包含在PictureBox或表单中的图片

公共子PrintImage(p为IPictureDisp,可选ByVal x,可选ByVal y,可选ByVal调整大小)


如果是IsMissing(x)那么x = Printer.CurrentX

如果是IsMissing(y)那么y = Printer.CurrentY

如果是IsMissing(调整大小)然后调整大小= 1

Printer.PaintPicture p,x,y,p.Width *调整大小,p。高度*调整大小


结束Sub

推荐答案

我认为您需要单独打印各种控件。 PrintPicture命令似乎只发送 .Picture (或者可能是 .Image )属性的内容,而不是其顶部显示的其他控件。


这是一个想法 - 就像快速解决方法一样,你可以将图片框和相关标签等复制到另一个表单上,然后使用 thatform.PrintForm
I think you will need to print the various controls separately. It seems likely that the PrintPicture command would only send the contents of the .Picture (or maybe .Image) property, not other controls that are shown over the top of it.

Here''s an idea - just as a quick workaround, could you duplicate the picturebox and associated labels etc. onto another form, then use thatform.PrintForm?



我认为您需要单独打印各种控件。 PrintPicture命令似乎只发送 .Picture (或者可能是 .Image )属性的内容,而不是其顶部显示的其他控件。


这是一个想法 - 就像快速解决方法一样,你可以将图片框和相关标签等复制到另一个表单上,然后使用 thatform.PrintForm
I think you will need to print the various controls separately. It seems likely that the PrintPicture command would only send the contents of the .Picture (or maybe .Image) property, not other controls that are shown over the top of it.

Here''s an idea - just as a quick workaround, could you duplicate the picturebox and associated labels etc. onto another form, then use thatform.PrintForm?




执行此操作的唯一问题是它只打印屏幕上可以看到的内容..我正在使用的图像需要调整大小以准确打印A4高度和宽度。


Me.PrintForm命令仅打印屏幕上可以看到的内容。


我可以尝试其他任何选项吗?


很多赞赏



The only issue with doing this is that it only prints what can be seen physically on the screen.. the image i''m using needs to be resized to print out exactly A4 in height and width.

Me.PrintForm command only prints what can be seen on the screen.

Any other options i can try??

Much Appreciated



做的唯一问题这是它只打印屏幕上可以看到的内容..我正在使用的图像需要调整大小以准确打印A4高度和宽度。

仅限Me.PrintForm命令打印屏幕上可以看到的内容。

我可以尝试其他任何选项吗?
The only issue with doing this is that it only prints what can be seen physically on the screen.. the image i''m using needs to be resized to print out exactly A4 in height and width.
Me.PrintForm command only prints what can be seen on the screen.
Any other options i can try??



尝试这些......

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆