VB打印窗体指定区域
'声明PrivateDeclareFunctionBitBltLib"gdi32"(ByValhDestDCAsLong,ByValxAsLong,ByValyAsLon...
'声明
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
BitBlt Picture3.hdc, 0, 0, Picture1.Width, Picture1.Height, Me.hdc, Picture1.Left, Picture1.Top, vbSrcCopy
Picture3.Refresh' 执行到这句的时候,picture3上应该有图像显示的,为什么显示不出来,打印出来的是空白的
Printer.PaintPicture Picture3.Image, 0, 0, Picture3.Width * 15, Picture3.Height * 15
Printer.EndDoc
执行到Picture3.Refresh'的时候,picture3上应该有图像显示的,为什么显示不出来,打印出来的是空白的,请高手解答一下! 展开
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
BitBlt Picture3.hdc, 0, 0, Picture1.Width, Picture1.Height, Me.hdc, Picture1.Left, Picture1.Top, vbSrcCopy
Picture3.Refresh' 执行到这句的时候,picture3上应该有图像显示的,为什么显示不出来,打印出来的是空白的
Printer.PaintPicture Picture3.Image, 0, 0, Picture3.Width * 15, Picture3.Height * 15
Printer.EndDoc
执行到Picture3.Refresh'的时候,picture3上应该有图像显示的,为什么显示不出来,打印出来的是空白的,请高手解答一下! 展开
展开全部
Private Const vbSrcCopy=&HCC0020
vbSrcCopy没有赋值
BitBlt Picture3.hdc, 0, 0, Picture3.Width, Picture3.Height, Me.hdc, Picture1.Left, Picture1.Top, vbSrcCopy
前两个Picture1改为Picture3
vbSrcCopy没有赋值
BitBlt Picture3.hdc, 0, 0, Picture3.Width, Picture3.Height, Me.hdc, Picture1.Left, Picture1.Top, vbSrcCopy
前两个Picture1改为Picture3
追问
按照你说的修改了源码,可是依然没有打印出图像出来!是不是picture的什么属性要设置过呢,AutoRedraw = true 也设置过了
追答
HI我,把工程发给我看看
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询