以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]请教标签的字如何反向设置 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=90895) |
||||
-- 作者:狐作非为 -- 发布时间:2016/9/24 15:13:00 -- [求助]请教标签的字如何反向设置 [求助]请教标签的字如何反向设置,或者说把标签旋转180 |
||||
-- 作者:有点蓝 -- 发布时间:2016/9/24 15:18:00 -- 没有办法 |
||||
-- 作者:有点蓝 -- 发布时间:2016/9/24 15:19:00 -- 设置图片框,放一张字反过来的图片 |
||||
-- 作者:狐作非为 -- 发布时间:2016/9/24 15:28:00 -- 那样就无法打印固定的标签纸了,是窗口打印方式 |
||||
-- 作者:有点蓝 -- 发布时间:2016/9/24 16:29:00 -- 用专业报表打印窗口,以http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=49175&skin=0,6楼代码为例 \'Dim tb As WinForm.TabControl = e.Form.Controls("TabControl1") Dim pan As WinForm.Panel = e.Form.Controls("Panel1") Dim doc As new PrintDoc Doc.PageSetting.Width=180 Doc.PageSetting.Height=100 Doc.PageSetting.TopMargin=10 Doc.PageSetting.BottomMargin=0 Doc.PageSetting.LeftMargin=10 Doc.PageSetting.RightMargin=10 Dim wbl As Double = Doc.PageSetting.Width.value / pan.Width Dim hbl As Double = Doc.PageSetting.Height.value / pan.Height For Each c As object In pan.Children If c.Text = "张三" Then Dim rg1 As New prt.RenderGraphics() rg1.Graphics.RotateTransform(180) Dim fnt As New Font("宋体",10) Dim s = rg1.Graphics.MeasureString(c.Text,fnt) rg1.Graphics.DrawString(c.Text,fnt,Brushes.Black,-1*s.Width,-1*s.Height) rg1.x = new C1.C1Preview.Unit(CStr(c.left * wbl)) rg1.y = new C1.C1Preview.Unit(CStr(c.Top * hbl)) Doc.Body.Children.Add(rg1) Else Dim rt As new prt.RenderText rt.Text = c.text rt.x = new C1.C1Preview.Unit(CStr(c.left * wbl)) rt.y = new C1.C1Preview.Unit(CStr(c.Top * hbl)) Doc.Body.Children.Add(rt) End If Next doc.Preview()
|