1. 求一個很多空文件夾,打開到最後是桌面開滿玫瑰花的小程序
這個你自己 做一個好了,
比如你建立一個文件夾,在裡面再建立一個…………,依次建立,然後下個開滿玫瑰花的程序,把程序的圖標換成文件夾的,這樣人家以為還是文件夾
改ico的軟體也很多, 不知道怎麼做的可以聯系我哦!
2. 我有一個「可執行程序」(EXE)的文件,一打開,電腦屏幕上就會出現很多玫瑰花,請問這是怎麼做到的
用VB
源程序如下:
Option Explicit
Dim s As Integer
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
Const LWA_COLORKEY_ALPHA As Long = &H3
Const WS_EX_LAYERED As Long = &H80000
Const GWL_EXSTYLE As Long = (-20)
Private RawWidth As Long '保存窗體的原始寬度
Private RawHeight As Long '保存窗體的原始高度
Private RawFont As Single '保存窗體的原始字體比
Private Sub Form_Resize()
Call ResizeForm(Me) '調用窗體改變時控制項隨之改變
End Sub
Private Sub Form_Load()
Call ResizeInit(Me) '在程序載入時必須加入,否則不能隨之改變
Timer1.Enabled = True
WindowsMediaPlayer1.URL = App.Path & "\" & "8.mp3"
End Sub
'在調用ResizeForm前先調用本函數
Public Sub ResizeInit(FormName As Form)
On Error Resume Next
Dim Obj As Control
RawWidth = FormName.ScaleWidth
RawHeight = FormName.ScaleHeight
RawFont = FormName.Font.Size / RawHeight
For Each Obj In FormName
Obj.Tag = Obj.Left & " " & Obj.Top & " " & Obj.Width & " " & Obj.Height & " "
Next Obj
End Sub
'按比例改變表單內各元件的大小,
'在調用ReSizeForm前先調用ReSizeInit函數
Public Sub ResizeForm(FormName As Form)
On Error Resume Next
Dim Pos(4) As Double
Dim i As Long, TempPos As Long, StartPos As Long
Dim Obj As Control
Dim ScaleX As Double, ScaleY As Double
ScaleX = FormName.ScaleWidth / RawWidth
'保存窗體寬度縮放比例
ScaleY = FormName.ScaleHeight / RawHeight
'保存窗體高度縮放比例
For Each Obj In FormName
StartPos = 1
For i = 0 To 4
'讀取控制項的原始位置與大小
TempPos = InStr(StartPos, Obj.Tag, " ", vbTextCompare)
If TempPos > 0 Then
Pos(i) = Mid(Obj.Tag, StartPos, TempPos - StartPos)
StartPos = TempPos + 1
Else
Pos(i) = 0
End If
'根據控制項的原始位置及窗體改變大
'小的比例對控制項重新定位與改變大小
Obj.Move Pos(0) * ScaleX, Pos(1) * ScaleY, Pos(2) * ScaleX, Pos(3) * ScaleY
Obj.Font.Size = RawFont * FormName.ScaleHeight
Next i
Next Obj
End Sub
'把以上添加到模塊中
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Timer1_Timer()
s = s + 1
If s = 1 Then
Picture1.Visible = True
ElseIf s = 2 Then
Picture2.Visible = True
ElseIf s = 3 Then
。。。。。。
End If
End Sub
省略號那裡 你自己看添加的圖片數量 自己添加是了 相信你能看懂吧
補充: Option Explicit
Dim s As Integer
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
Const LWA_COLORKEY_ALPHA As Long = &H3
Const WS_EX_LAYERED As Long = &H80000
Const GWL_EXSTYLE As Long = (-20)
Private RawWidth As Long '保存窗體的原始寬度
Private RawHeight As Long '保存窗體的原始高度
Private RawFont As Single '保存窗體的原始字體比
Private Sub Form_Resize()
Call ResizeForm(Me) '調用窗體改變時控制項隨之改變
End Sub
Private Sub Form_Load()
Call ResizeInit(Me) '在程序載入時必須加入,否則不能隨之改變
Timer1.Enabled = True
WindowsMediaPlayer1.URL = App.Path & "\" & "8.mp3"
End Sub
'在調用ResizeForm前先調用本函數
Public Sub ResizeInit(FormName As Form)
On Error Resume Next
Dim Obj As Control
RawWidth = FormName.ScaleWidth
RawHeight = FormName.ScaleHeight
RawFont = FormName.Font.Size / RawHeight
For Each Obj In FormName
Obj.Tag = Obj.Left & " " & Obj.Top & " " & Obj.Width & " " & Obj.Height & " "
Next Obj
End Sub
'按比例改變表單內各元件的大小,
'在調用ReSizeForm前先調用ReSizeInit函數
Public Sub ResizeForm(FormName As Form)
On Error Resume Next
Dim Pos(4) As Double
Dim i As Long, TempPos As Long, StartPos As Long
Dim Obj As Control
Dim ScaleX As Double, ScaleY As Double
ScaleX = FormName.ScaleWidth / RawWidth
'保存窗體寬度縮放比例
ScaleY = FormName.ScaleHeight / RawHeight
'保存窗體高度縮放比例
For Each Obj In FormName
StartPos = 1
For i = 0 To 4
'讀取控制項的原始位置與大小
TempPos = InStr(StartPos, Obj.Tag, " ", vbTextCompare)
If TempPos > 0 Then
Pos(i) = Mid(Obj.Tag, StartPos, TempPos - StartPos)
StartPos = TempPos + 1
Else
Pos(i) = 0
End If
'根據控制項的原始位置及窗體改變大
'小的比例對控制項重新定位與改變大小
Obj.Move Pos(0) * ScaleX, Pos(1) * ScaleY, Pos(2) * ScaleX, Pos(3) * ScaleY
Obj.Font.Size = RawFont * FormName.ScaleHeight
Next i
Next Obj
End Sub
'把以上添加到模塊中
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Timer1_Timer()
s = s + 1
If s = 1 Then
Picture1.Visible = True
ElseIf s = 2 Then
Picture2.Visible = True
ElseIf s = 3 Then
。。。。。。
End If
End Sub
那些玫瑰 自己添加在窗體上
省略號那裡 你自己看添加的圖片數量 自己添加是了
3. 求電腦小程序——1、一個文件夾,名為「禮物」,點開後會出現很多玫瑰花。2、點擊後可以在桌面下雪
第一個禮物我有~
希望採納