vb.net图片加边框 vb怎么在图片框显示文字

VB软件中,用图像框做背景画面,在上面再做一些其他控件等,这样组成一个主窗口,行吗?【vb.net图片加边框 vb怎么在图片框显示文字】当然可以,图像框本身和Form窗体一样,就是个容器控件,可以容纳其他控件
vb.net 怎么把很多个图片框 放在一个容器或者其他 里面., 可以 有横拉条和下拉条的呢?Panel控件就是容器,在窗体上添加一个Panel1控件,将其拖放到合适的位置与大小,然后设置Panel1控件的:
AutoScroll 属性为True
Panel1.AutoScrollMinSize 属性
Panel1控件里,添加你的图片框(此时可以滚动Panel1控件里的滚动条)
OK了吧!
请教Word中如何用VBA 将所有图片加上边框只要一句代码?那就给你一句参考一下吧:picCount = ActiveDocument.InlineShapes.Count '计算文件中图片数目在Word中vb.net图片加边框,插入的图片已被转化为 InlineShape 对象 。之后用For循环语句vb.net图片加边框,给所有图片加黑色边框 。单个图片加边框的语句,你自己可以录制一个宏看看,将录制的宏代码拷贝到For循环中修改一下即可 。
___________________________________________________________________
单个图片加边框,你自己录制宏就可以看到代码vb.net图片加边框了,这是学习VBA的必由之路啊 。选中一张图片,工具-宏-录制新宏,然后 , 格式-边框和阴影,给图片加上黑边框,然后,alt F11打开VB编译器,就看到代码了 。本想只授人以渔即足够了 , 但犹豫了一下,还是贴给你吧:
With Selection.InlineShapes(1)
With .Borders(wdBorderLeft)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorAutomatic
End With
With .Borders(wdBorderRight)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorAutomatic
End With
With .Borders(wdBorderTop)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorAutomatic
End With
With .Borders(wdBorderBottom)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorAutomatic
End With
.Borders.Shadow = False
End With
With Options
.DefaultBorderLineStyle = wdLineStyleSingle
.DefaultBorderLineWidth = wdLineWidth050pt
.DefaultBorderColor = wdColorAutomatic
End With
计算图片数目是为了For循环用的 , 有多少图片就要循环多少次,给所有图片都加上边框 。
For i = 1 to picCount
......
Next i
中间就是上面那段代码,把InlineShapes(1)改为InlineShapes(i)
在VB.NET的父窗体中,用插入图片框的方法设置背景图片后,当显示子窗体时,子窗体被背景图片遮挡,你设MDIContainer为true造出一个MDIparent的时候vb.net图片加边框,系统自动加了个MDIclient控件在下面的部分vb.net图片加边框,把那个找出来背景图片改掉 , 就不用图片框
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As EventArgs) Handles MyBase.Load
For Each ctl As Control In Me.Controls
If TypeOf ctl Is MdiClient Then
'Set properties of ctl here, e.g.
ctl.BackgroundImage = My.Resources.MdiBackgroundImage
Exit For
End If
Next ctl
End Sub
关于vb.net图片加边框和vb怎么在图片框显示文字的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息 , 记得收藏关注本站 。

    推荐阅读