标题:有关picturebox和打包问题,
取消只看楼主
jiangdongbing
Rank: 1
等 级:新手上路
帖 子:40
专家分:0
注 册:2006-8-24
 问题点数:0 回复次数:6 
有关picturebox和打包问题,
不好意思, 初来咋道,想哪位大哥能帮忙下 我急用.所以发第二次
在vb6.0中 怎么才能在picturebox 中已经显示了字母<汉字>,但要求是从底五个像素开始显示.怎么才能做到啊?又怎么获取picturebox中的文本呢,
我已经定义了
Picture1.ScaleMode = vbpixel
如何定义picturebox中的汉字的高度是12个像素?本来想用Picture1.TextHeight ,但他是只读的.
还有就是用什么东西可以使vb工程打包成一个安装的软件,?????
搜索更多相关主题的帖子: picturebox 打包 
2006-08-24 13:38
jiangdongbing
Rank: 1
等 级:新手上路
帖 子:40
专家分:0
注 册:2006-8-24
得分:0 

各位大哥/大姐 下面的程序是怎么使用的呀?
With tLF
sFont = myfont.Name
temp = StrConv(sFont, vbFromUnicode)
For iChar = 1 To Len(sFont)
.lfFaceName(iChar - 1) = temp(iChar - 1)
Next iChar
.lfItalic = myfont.Italic
.lfWeight = IIf(myfont.Bold, FW_BOLD, FW_NORMAL)
.lfWidth = fontwidth
.lfHeight = fontheight
.lfUnderline = fontunderline
.lfStrikeOut = fontStrikethrough
.lfCharSet = myfont.Charset
End With
hFnt = CreateFontIndirect(tLF)


2006-08-24 15:02
jiangdongbing
Rank: 1
等 级:新手上路
帖 子:40
专家分:0
注 册:2006-8-24
得分:0 

先谢谢 yeshirow 和学习VB才2天 对我的帮助


2006-08-24 15:03
jiangdongbing
Rank: 1
等 级:新手上路
帖 子:40
专家分:0
注 册:2006-8-24
得分:0 
yeshirow 谢谢您.不过我刚刚用这个东西,你说的"建立好 一個 LOGFONT 後, 要用 SelectObject 將其選入 hDC 中,
再繪圖"我不明白什么意思.能说的具体些吗

2006-08-24 15:39
jiangdongbing
Rank: 1
等 级:新手上路
帖 子:40
专家分:0
注 册:2006-8-24
得分:0 
谢谢 那我先试一试 看看.因为我在做的是一个led的界面,.同时也要commondialog 来改变字体,picture不过是把文字的像素传到单片机内,会不会对commondialog有影响,

2006-08-24 16:32
jiangdongbing
Rank: 1
等 级:新手上路
帖 子:40
专家分:0
注 册:2006-8-24
得分:0 

Private Type plogfont
lfHeight As Long
lfWidth As Long
lfEscapement As Long
lfOrientation As Long
lfWeight As Long
lfItalic As Boolean
lfUnderline As Boolean
lfStrikeOut As Byte
lfCharSet As Byte
lfOutPrecision As Byte
lfClipPrecision As Byte
lfQuality As Byte
lfPitchAndFamily As Byte
lffontname As String
End Type


Public plogfont As LOGFONT
Private Sub send_Click()
Dim hfont As Long, hfontsrc As Long
With plogfont
.lfHeight = 12
.lfWidth = 9
.lfEscapement = 0
.lfOrientation = 0
.lfWeight = FW_NORMAL
.lfItalic = False
.lfUnderline = False
.lfStrikeOut = False
.lfCharSet = DEFAULT_CHARSET
.lfOutPrecision = OUT_DEVICE_PRECIS
.lfClipPrecision = CLIP_DEFAULT_PRECIS
.lfQuality = DEFAULT_QUALITY
.lfPitchAndFamily = DEFAULT_PITCH
.lffontname = "Courier"
End With

hfont = CreateFont(plogfont)
我这样弄,还是不对啊 他说plogfont 是argument not option 的错误,究竟该怎么办的呀 嘿嘿 在一次求救


2006-08-24 18:35
jiangdongbing
Rank: 1
等 级:新手上路
帖 子:40
专家分:0
注 册:2006-8-24
得分:0 

嘿嘿 发错了 是这样的
Private Type LOGFONT
lfHeight As Long
lfWidth As Long
lfEscapement As Long
lfOrientation As Long
lfWeight As Long
lfItalic As Boolean
lfUnderline As Boolean
lfStrikeOut As Byte
lfCharSet As Byte
lfOutPrecision As Byte
lfClipPrecision As Byte
lfQuality As Byte
lfPitchAndFamily As Byte
lffontname As String
End Type


Public plogfont As LOGFONT
Private Sub send_Click()
Dim hfont As Long, hfontsrc As Long
With plogfont
.lfHeight = 12
.lfWidth = 9
.lfEscapement = 0
.lfOrientation = 0
.lfWeight = FW_NORMAL
.lfItalic = False
.lfUnderline = False
.lfStrikeOut = False
.lfCharSet = DEFAULT_CHARSET
.lfOutPrecision = OUT_DEVICE_PRECIS
.lfClipPrecision = CLIP_DEFAULT_PRECIS
.lfQuality = DEFAULT_QUALITY
.lfPitchAndFamily = DEFAULT_PITCH
.lffontname = "Courier"
End With

hfont = CreateFont(plogfont)
我这样弄,还是不对啊 他说plogfont 是类型不匹配的错误,究竟该怎么改的呀 嘿嘿 在一次求救


2006-08-24 18:38



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-85863-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.483838 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved