frame控件的边框怎么改变颜色?

lijuan1215_2009 2011-01-13 09:59:05
如题。
想给边框换个颜色,但是好像没有那个属性。怎么改呢?
谢谢!
...全文
1125 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
savagex510932 2011-12-15
  • 打赏
  • 举报
回复
因为需要,所以写了这个过程。首先在要改变的frame中放置好一个label,用于显示frame的名字,放一个shape,用来绘图。

下边是公用过程:
Public Sub ReBorderFrame(iFrame As Frame, iShape As Shape, iLabel As Label, iColor As OLE_COLOR)
With iLabel
.ZOrder
.AutoSize = True
.left = 15 * Screen.TwipsPerPixelX
.top = 0
.BackColor = iFrame.BackColor
.Font = iFrame.Font
.Caption = " " & iFrame.Caption & " "
End With
With iShape
.BorderColor = iColor
.left = 0
.top = iLabel.height / 2
.height = iFrame.height - .top
.width = iFrame.width
End With
End Sub

别说不会用。。。汗

第一次发贴,如果犯规了谢谢提醒下哈。
savagex510932 2011-12-15
  • 打赏
  • 举报
回复
因为需要,所以写了这个过程。首先在要改变的frame中放置好一个label,用于显示frame的名字,放一个shape,用来绘图。

下边是公用过程:
Public Sub ReBorderFrame(iFrame As Frame, iShape As Shape, iLabel As Label, iColor As OLE_COLOR)
With iLabel
.ZOrder
.AutoSize = True
.left = 15 * Screen.TwipsPerPixelX
.top = 0
.BackColor = iFrame.BackColor
.Font = iFrame.Font
.Caption = " " & iFrame.Caption & " "
End With
With iShape
.BorderColor = iColor
.left = 0
.top = iLabel.height / 2
.height = iFrame.height - .top
.width = iFrame.width
End With
End Sub

别说不会用。。。汗

熊孩子开学喽 2011-01-14
  • 打赏
  • 举报
回复
把Frame设成无边框的,然后画几条线进去吧
ningweidong 2011-01-14
  • 打赏
  • 举报
回复
frame边框的颜色没有那个属性,但你可以想其它办法来实现那个功能,最简单的就是画几条带颜色的线代替边框
lsh6688 2011-01-14
  • 打赏
  • 举报
回复
好像不可以 你可以使用image 控件呀
jiashie 2011-01-13
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 chinaboyzyq 的回复:]

可以加个shape控件或用line控件帮你做到。
[/Quote]++
chinaboyzyq 2011-01-13
  • 打赏
  • 举报
回复
可以加个shape控件或用line控件帮你做到。
jhone99 2011-01-13
  • 打赏
  • 举报
回复
借用一下microsoft forms 2.0 object library的frame
jhone99 2011-01-13
  • 打赏
  • 举报
回复
实在不行用其他控件做一个

7,759

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧