'這個拿去試一試,兩個時鐘,兩個圖片框,自己設定圖片框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)
當你用一次循環,將這些點重設以后,再次來設置,就不會有什么變化了,我感覺應該加上一個恢復狀態的語句。改變后,再恢復,然后再點才會有效果。
分享標題:vb.net百葉窗效果 jquery百葉窗
分享路徑:http://newbst.com/article2/doihgoc.html
成都網站建設公司_創新互聯,為您提供外貿網站建設、App開發、關鍵詞優化、、商城網站、虛擬主機
聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯