网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

vbnet图片百叶窗,vbnet图像处理

vb.net中怎么设置背景图片全部填充在窗体里

建个图片框控件,它有个随控件大小改变,图片也改变的属性,设置为“是”然后用该控件的MOVE方法,来实现。在Form_Resize事件里编,不知道NET有这个事件没。

创新互联主营邕宁网站建设的网络公司,主营网站建设方案,App定制开发,邕宁h5小程序设计搭建,邕宁网站营销推广欢迎邕宁等地区企业咨询

vb.net 怎么把很多个图片框 放在一个容器或者其他 里面., 可以 有横拉条和下拉条的呢?

Panel控件就是容器,在窗体上添加一个Panel1控件,将其拖放到合适的位置与大小,然后设置Panel1控件的:

AutoScroll 属性为True

Panel1.AutoScrollMinSize 属性

Panel1控件里,添加你的图片框(此时可以滚动Panel1控件里的滚动条)

OK了吧!

vb制作的屏保系统,由多张图片循环播放,如何在图片播放时加上一定的特效,比如百叶窗等等,就像PPT制作的

'这个拿去试一试,两个时钟,两个图片框,自己设定图片框2的大小,比如让它和窗体一样大

'查一查PaintPicture的用法,就明白了

'去掉Picture2

Dim Pic_num As Long

Dim Pic_name() As String

Dim pic_star As Long

Dim p_width As Single

Dim p_height As Single

Dim bili_w As Single

Dim bili_h As Single

Dim v_mod As Long

Private Sub Form_Load()

Dim L_name As String

Pic_num = 0

ReDim Pic_name(Pic_num)

L_name = Dir(App.Path "\pic\*.JPG")

Do While L_name ""

ReDim Preserve Pic_name(Pic_num)

Pic_name(Pic_num) = L_name

Pic_num = Pic_num + 1

L_name = Dir

Loop

L_name = Dir(App.Path "\pic\*.BMP")

Do While L_name ""

ReDim Preserve Pic_name(Pic_num)

Pic_name(Pic_num) = L_name

Pic_num = Pic_num + 1

L_name = Dir

Loop

Picture1.AutoSize = True

Picture1.AutoRedraw = True

Picture1.Visible = False

' Me.AutoSize = False

Me.AutoRedraw = True

Me.Visible = True

Timer1.Interval = 10

Timer1.Enabled = False

Timer2.Interval = 50

Timer2.Enabled = False

If Pic_num 0 Then

Picture1.Picture = LoadPicture(App.Path "\pic\" Pic_name(0))

Me.PaintPicture Picture1.Picture, 0, 0, Me.ScaleWidth, Me.ScaleHeight, 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight

Timer1.Enabled = True

Timer1.Interval = 2000

Else

MsgBox ("没有图片显示!")

End If

End Sub

Private Sub Form_Resize()

Me.Width = Me.Width

Me.Height = Me.Width

Me.Top = 0

Me.Left = 0

End Sub

Private Sub Timer1_Timer()

Dim L_id As Long

Randomize

L_id = Int((Pic_num) * Rnd)

Picture1.Picture = LoadPicture(App.Path "\pic\" Pic_name(L_id))

bili_w = Picture1.ScaleWidth / Me.ScaleWidth

bili_h = Picture1.ScaleHeight / Me.ScaleHeight

p_width = Me.Width / 100

p_height = Me.Height / 100

pic_star = 0

Randomize

v_mod = Int(10 * Rnd)

'v_mod = 9'取消单引号并修改常数数可看单一效果

Timer1.Enabled = False

Timer2.Enabled = True

End Sub

Private Sub Timer2_Timer()

If pic_star 101 Then

pic_star = pic_star + 1

Select Case v_mod

Case 0

Me.PaintPicture Picture1.Picture, 0, 0, Me.Width, pic_star * p_height, 0, 0, Picture1.Width, bili_h * pic_star * p_height '从上向下

Case 1

Me.PaintPicture Picture1.Picture, 0, 0, pic_star * p_width, Me.Height, 0, 0, bili_w * pic_star * p_width, Picture1.Height '从左向右

Case 2

Me.PaintPicture Picture1.Picture, 0, 0, Me.Width, pic_star * p_height, 0, 0, Picture1.Width, Picture1.Height '压缩的从上向下

Case 3

Me.PaintPicture Picture1.Picture, 0, 0, pic_star * p_width, Me.Height, 0, 0, Picture1.Width, Picture1.Height '压缩的从左向右

Case 4

Me.PaintPicture Picture1.Picture, 0, 0, pic_star * p_width, pic_star * p_height, 0, 0, Picture1.Width, Picture1.Height '压缩的从左上向右下

Case 5

Me.PaintPicture Picture1.Picture, Me.Width - pic_star * p_width, Me.Height - pic_star * p_height, pic_star * p_width, pic_star * p_height, 0, 0, Picture1.Width, Picture1.Height '压缩的从右下向左上

Case 6

Me.PaintPicture Picture1.Picture, Me.Width / 2 - pic_star * p_width / 2, 0, pic_star * p_width / 2, Me.Height, 0, 0, Picture1.Width / 2, Picture1.Height '压缩的从中向左

Me.PaintPicture Picture1.Picture, Me.Width / 2, 0, pic_star * p_width, Me.Height, Picture1.Width / 2, 0, Picture1.Width, Picture1.Height '压缩的从中向右

Case 7

Me.PaintPicture Picture1.Picture, 0, Me.Height / 2 - pic_star * p_height / 2, Me.Width, pic_star * p_height / 2, 0, 0, Picture1.Width, Picture1.Height / 2 '压缩的从中向上

Me.PaintPicture Picture1.Picture, 0, Me.Height / 2, Me.Width, pic_star * p_height, 0, Picture1.Height / 2, Picture1.Width, Picture1.Height '压缩的从中向下

Case 8

Me.PaintPicture Picture1.Picture, Me.Width / 2 - pic_star * p_width / 2, Me.Height / 2 - pic_star * p_height / 2, pic_star * p_width / 2, pic_star * p_height / 2, 0, 0, Picture1.Width / 2, Picture1.Height / 2 '压缩的从中向左上

Me.PaintPicture Picture1.Picture, Me.Width / 2, Me.Height / 2, pic_star * p_width, pic_star * p_height, Picture1.Width / 2, Picture1.Height / 2, Picture1.Width, Picture1.Height '压缩的从中向右下

Me.PaintPicture Picture1.Picture, Me.Width / 2, Me.Height / 2 - pic_star * p_height / 2, pic_star * p_width / 2, pic_star * p_height / 2, Picture1.Width / 2, 0, Picture1.Width / 2, Picture1.Height / 2 '压缩的从中向右上

Me.PaintPicture Picture1.Picture, Me.Width / 2 - pic_star * p_width / 2, Me.Height / 2, pic_star * p_width / 2, pic_star * p_height / 2, 0, Picture1.Height / 2, Picture1.Width / 2, Picture1.Height / 2 '压缩的从中向左下

Case 9

For k = 0 To 9

Me.PaintPicture Picture1.Picture, 0, k * Me.Height / 10, Me.Width, 5 * pic_star * p_height / 10, 0, k * (Picture1.Height / 10), Picture1.Width, (Picture1.Height / 10) '水平百叶窗

Next

If pic_star = 21 Then

pic_star = 101

End If

End Select

Else

pic_star = 0

Timer1.Enabled = True

Me.PaintPicture Picture1.Picture, 0, 0, Me.ScaleWidth, Me.ScaleHeight, 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight

Timer2.Enabled = False

End If

End Sub

'这回做了9个,应该明白了吧,其实你第一回的5分也应该给选我,估计是你没明白用法


新闻标题:vbnet图片百叶窗,vbnet图像处理
网站URL:http://bjjierui.cn/article/dsidppe.html

其他资讯