vb.net百叶窗 bim百叶窗

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

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

海珠网站制作公司哪家好,找创新互联!从网页设计、网站建设、微信开发、APP开发、成都响应式网站建设等网站项目制作,到程序开发,运营维护。创新互联从2013年创立到现在10年的时间,我们拥有了丰富的建站经验和运维经验,来保证我们的工作的顺利进行。专注于网站建设就选创新互联。

'查一查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分也应该给选我,估计是你没明白用法

如何给VB.NET窗体添加子窗体?

直接添加一个MID父窗体或在已有窗体的属性中找到IsMDIContainer属性,然后设置为True,然后创建第二个窗体 ,需要加载子窗体的时候:

Dim NewMDIChild As New Form2

NewMDIChild.MdiParent = Me

NewMDIChild.Show()

Public Shared Sub CheckMDIChildForm(ByVal MDIForm As Windows.Forms.Form, ByVal MDIChildForm As Windows.Forms.Form, ByVal MDIChildFormName As String)

If MDIForm.MdiChildren.Length  1 Then

'如果没有任何一个MDI子窗体,则创该MDI子窗体的窗体实例

Dim MDIChildFrm As Windows.Forms.Form = MDIChildForm ' 定义MDI子窗体

MDIChildFrm.MdiParent = MDIForm '指定父窗体

MDIChildFrm.Show() '打开窗体

Exit Sub

Else

Dim x As Integer

Dim frmyn As Boolean

For x = 0 To (MDIForm.MdiChildren.Length) - 1

Dim tempChild As Windows.Forms.Form = CType(MDIForm.MdiChildren(x), Windows.Forms.Form)

If tempChild.Name = MDIChildFormName Then

'检测到有该MDI子窗体,设为激活 并退出循环

frmyn = True

tempChild.BringToFront()

Exit For

Else

frmyn = False

End If

Next

If Not frmyn Then

'在打开的窗体中没检测到则新建

Dim MDIChildFrm As Windows.Forms.Form = MDIChildForm ' 定义MDI子窗体

MDIChildFrm.MdiParent = MDIForm '指定父窗体

MDIChildFrm.Show() '打开窗体

End If

End If

End Sub

常见的窗体类型有哪几种?它们的主要不同点是什么?

常见类型:平开窗、推拉窗、倒窗、百叶窗、天窗。

不同点:

1、开启方式不同。

平开窗窗扇通过铰链与窗框结合,窗扇可以旋转开启;推拉窗则采用装有滑轮的窗扇在窗框上的轨道滑行;倒窗通过旋转窗子的把手,带动窗子内部五金机构开启;百叶窗无法很好地密闭,仅通过百叶角度开关;天窗一般不可开启。

2、密闭性不同。

平开窗关闭时气密性好;推拉窗最多只有50%的窗扇可以打开,关闭时气密性差;倒窗多锁点密封,可以使窗子的密封性大大增强;百叶窗密闭性较差;天窗一般不可开启,密闭性较好。

3、适用条件不同。

平开窗一般用于厨房、卫房间等的通风换气;推拉窗用于空间狭窄的位置;倒窗不用破坏原有窗体,升级方便快捷;百叶窗必须和普通的窗或玻璃幕墙结合在一起使用;天窗常用于采光。

扩展资料

窗户的组成:

现代的窗户的窗由窗框、玻璃和活动构件(铰链、执手、滑轮等)三部分组成。窗框负责支撑窗体的主结构,可以是木材、金属、陶瓷或塑料材料,透明部分依附在窗框上,可以是纸、布、丝绸或玻璃材料。

活动构件主要以金属材料为主,在人手触及的地方也可能包裹以塑料等绝热材料。材质可分成三大类—塑钢、铝合金、木质。三者各有所长。

参考资料来源:百度百科-窗户


网页名称:vb.net百叶窗 bim百叶窗
文章源于:http://pwwzsj.com/article/dogoihg.html