十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
'这个拿去试一试,两个时钟,两个图片框,自己设定图片框2的大小,比如让它和窗体一样大
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分也应该给选我,估计是你没明白用法
百叶窗隔断是很多家庭都会选择的隔断种类,既能够保证隔断的效果,而且能够保持光线的通透性。越来越多的家庭想选择百叶窗,但又对百叶窗的了解很少,例如百叶窗有哪些特点呢?百叶窗有隔音效果吗?下面我就为大家来解答百叶窗有哪些特点及百叶窗有隔音效果吗。
百叶窗隔断是很多家庭都会选择的隔断种类,既能够保证隔断的效果,而且能够保持光线的通透性。越来越多的家庭想选择百叶窗,但又对百叶窗的了解很少,例如百叶窗有哪些特点呢?百叶窗有隔音效果吗?下面我就为大家来解答百叶窗有哪些特点及百叶窗有隔音效果吗。
百叶窗有哪些特点:
1、铝合金美观节能,简洁利落?百叶窗可完全收起,窗外景色一览无余,窗户简约大方. 窗帘 则占用了窗户的部分空间,使得 房屋 的视觉窗户的宽度受到影响,显得繁琐。
2、保护隐私以叶片的凹凸方向来阻挡外界视线,采光的同时,阻挡了由上至下的外界视线夜间,叶片的凸面向室内的话,影子不会映显到室外,干净放心,清洁方便。平时只需以抹布擦拭即可,清洗时请用中性洗剂。不必担心退色,变色.防水型百叶窗还可以完全水洗。
3、冬暖夏凉采用了隔热性好的材料,有效保持室内温度,达到了节省能源的目的。简单自由角度调整,控制射入光线,以调整叶片角度来控制射入光线,可以任意调节叶片至适合的位置。
4、阻挡紫外线有效阻挡紫外线的射入,保护家具不受紫外线的影响而退色。百叶窗与窗帘相比,百叶窗那可以灵活调节的叶片具有窗帘所欠缺的功能。在遮阳方面,百叶窗除了可以抵挡紫外线辐射之外,还能调节室内光线;在通风方面,百叶窗固定式的安装以及厚实的质地,可以舒心地享受习习凉风而没有其它顾虑;窗帘的飘摆会室内生活时隐时现,百叶窗层层叠覆式的设计则保证了家居的私密性;此外,百叶窗完全封闭时就如多了一扇窗,能起到隔音隔热的作用。
隔音百叶窗有隔音效果吗:
1、百叶式消声器一般消声量为5~15dB(A),消声特性呈中高频性,百叶式消声器的消声性能主要决定于单片百叶的形式、百叶间距、安装角度及有效消声 长度 等因素。通风消声百叶结构,可消除噪声的窗式结构,根据使用环境需求采用不锈钢、铝合金、镀锌钢板等材料制作,加之特殊加工工艺,在任何气候条件下使用,且气流阻力小,消声量大,外形美观。
2、低频时,安装百叶窗以及百叶窗表面吸声处理的效果不明显。 频率 升高,百叶窗表面吸声处理后,隔声效果明显体现,且各个频率上安装带吸声的百叶窗的房间,内部声压场数值较低。总之,吸声后,百叶窗隔声效果明显提升,频率越高效果越明显。
通过上面我给大家介绍的百叶窗有哪些特点,隔音百叶窗隔音效果好吗。相信大家对百叶窗有了一定的了解,接下来如何选择,是不是要安装百叶窗,大家可以根据自己的喜好来决定。
用LABEL来做移动就是存在闪动的问题,你可以试试加个Frame1试试看,或者用picturebox看看!
实现百叶窗等特效如果不会API可以参考遮盖层的概念!
HI发不上去,放这里了,一个百叶窗的效果,自己存为FRM文件就行
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 2250
ClientLeft = 60
ClientTop = 450
ClientWidth = 5295
LinkTopic = "Form1"
ScaleHeight = 2250
ScaleWidth = 5295
StartUpPosition = 3 '窗口缺省
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = H8000000D
ForeColor = H80000008
Height = 1095
Index = 5
Left = 3960
ScaleHeight = 1065
ScaleWidth = 705
TabIndex = 7
Top = 360
Width = 735
End
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = H8000000D
ForeColor = H80000008
Height = 1095
Index = 4
Left = 3240
ScaleHeight = 1065
ScaleWidth = 705
TabIndex = 6
Top = 360
Width = 735
End
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = H8000000D
ForeColor = H80000008
Height = 1095
Index = 3
Left = 2520
ScaleHeight = 1065
ScaleWidth = 705
TabIndex = 5
Top = 360
Width = 735
End
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = H8000000D
ForeColor = H80000008
Height = 1095
Index = 2
Left = 1800
ScaleHeight = 1065
ScaleWidth = 705
TabIndex = 4
Top = 360
Width = 735
End
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = H8000000D
ForeColor = H80000008
Height = 1095
Index = 1
Left = 1080
ScaleHeight = 1065
ScaleWidth = 705
TabIndex = 3
Top = 360
Width = 735
End
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = H8000000D
ForeColor = H80000008
Height = 1095
Index = 0
Left = 360
ScaleHeight = 1065
ScaleWidth = 705
TabIndex = 2
Top = 360
Width = 735
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 495
Left = 1440
TabIndex = 1
Top = 1560
Width = 1815
End
Begin VB.TextBox Text1
Height = 1095
Left = 360
TabIndex = 0
Text = "Text1"
Top = 360
Width = 4335
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
wid = Int(Picture1(0).Width / 50)
For i = 1 To 50
For n = 0 To Picture1.Count - 1
Picture1(n).Width = Picture1(n).Width - wid
Next n
Next i
For n = 0 To Picture1.Count - 1
Picture1(n).Visible = False
Next n
End Sub
Private Sub form_load()
For i = 0 To Picture1.Count - 1
Picture1(i).Width = Text1.Width / (Picture1.Count)
Picture1(i).Height = Text1.Height
Picture1(i).Top = Text1.Top
Picture1(i).Left = Text1.Left + i * Text1.Width / 6
Picture1(i).BackColor = H8000000D
Next i
End Sub
我认为问题出在这里:
a = GetPixel(Picture1.hdc, X, Y)
b = SetPixel(Me.hdc, X, Y, a)
当你用一次循环,将这些点重设以后,再次来设置,就不会有什么变化了,我感觉应该加上一个恢复状态的语句。改变后,再恢复,然后再点才会有效果。