惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
Security Latest
Security Latest
Simon Willison's Weblog
Simon Willison's Weblog
O
OpenAI News
GbyAI
GbyAI
L
LINUX DO - 最新话题
A
Arctic Wolf
T
Tor Project blog
G
GRAHAM CLULEY
I
InfoQ
博客园_首页
IT之家
IT之家
The Register - Security
The Register - Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
K
Kaspersky official blog
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
U
Unit 42
PCI Perspectives
PCI Perspectives
量子位
P
Palo Alto Networks Blog
S
Securelist
T
Troy Hunt's Blog
博客园 - 【当耐特】
Recorded Future
Recorded Future
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
Engineering at Meta
Engineering at Meta
T
The Blog of Author Tim Ferriss
博客园 - 聂微东
罗磊的独立博客
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
NISL@THU
NISL@THU
C
Cisco Blogs
T
Threatpost
有赞技术团队
有赞技术团队
Forbes - Security
Forbes - Security
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
T
The Exploit Database - CXSecurity.com
Cloudbric
Cloudbric
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
C
Cyber Attacks, Cyber Crime and Cyber Security

博客园 - 王跃军

成本安全硬件(二):RFID on PN532 之WINDOWS 环境应用 C# 委托的三种调用示例(同步调用 异步调用 异步回调) 之 FUNC 版 vb中使用Xtreme Command Bars ActiveX Control 的IPrintView接口绘制图形 android开发专题系列-OPENGL android开发专题系列-Android开发指南 android开发专题系列-一个简单的游戏的设计 android网站汇集 android开发资料(DEVELOPER.ANDROID.COM/SDK)WORD版 可也extJs相媲美的js 控件集 DHTMLX 对ASP.NET 安全方面的一些理解 ANDROID 开发资源网站列表(2008年1月14日) [转]林西:企业信息化规划方法 [收藏]DIV+CSS布局积累 [转]常用SQL 深入实例理解 [转]可用表格样式表 DataSet 加载XML 数据效果 纯ajax式,多用户选择示例 asp.net全局异常处理 也nhibernate会遇到问题,还好找到原因了
vb中使用Xtreme Command Bars ActiveX Control 的IPrintView接口绘制图形_后记
王跃军 · 2012-01-16 · via 博客园 - 王跃军

上篇文章 写了vb中使用Xtreme Command Bars ActiveX Control 的IPrintView接口绘制图形,但后来发现有个致命的问题,预览时没有问题,但实际输出到打印机时,则是一片

黑色,所以上篇代码无效.现重新上代码,解决以上问题的

本次实现原理是像素获取后,再逐个重绘出来.

首先还是使用IPrintView接口的类,

Implements IPrintView
Private Type RECT
        Left As Long
        Top As Long
        Right As Long
        Bottom As Long
End Type


Private Sub IPrintView_BeginPrinting(ByVal hdc As Long, ByVal hAttribDC As Long, ByVal PrintInfo As XtremeCommandBars.PrintInfo)




End Sub


Private Sub IPrintView_EndPrinting(ByVal hdc As Long, ByVal hAttribDC As Long, ByVal PrintInfo As XtremeCommandBars.PrintInfo)

End Sub

Private Sub IPrintView_PrepareDC(ByVal hdc As Long, ByVal hAttribDC As Long, ByVal PrintInfo As XtremeCommandBars.PrintInfo)

End Sub

Private Sub IPrintView_PreparePrinting(ByVal PrintInfo As XtremeCommandBars.PrintInfo)
    PrintInfo.MaxPage = 1
    
End Sub

Private Sub IPrintView_PrintPage(ByVal hdc As Long, ByVal hAttribDC As Long, ByVal PrintInfo As XtremeCommandBars.PrintInfo)
Dim r As RECT
        r.Left = PrintInfo.PrintRectLeft
        r.Top = PrintInfo.PrintRectTop
        r.Right = PrintInfo.PrintRectRight
        r.Bottom = PrintInfo.PrintRectBottom
If Not PrintInfo.PreviewMode Then
ZoomImage 4500, 4500
End If

MemOutPut hdc, False



End Sub

  然后是调用类

With Pic1
.AutoRedraw = True
.Appearance = 0
.BorderStyle = 0
.ScaleMode = 3
End With
W = Pic1.ScaleWidth
H = Pic1.ScaleHeight
MemGet Pic1.hdc, 0, 0, W - 1, H - 1

Set Form7.PrintPreview.PrintView = cls
Form7.Show vbModal

然后是相关的函数模块下载