تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
تغيير خلفية سطح المكتب
#1
كاتب الموضوع : Boutemine Oualid


كود :
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long
' ' constants
Private Const SPI_SETDESKWALLPAPER = 20
Private Const SPIF_SENDWININICHANGE = &H2
Private Const SPIF_UPDATEINIFILE = &H1
Dim ctr As Integer
' Form contains a Command Button (cmddefaultwallpaper) and a Timer with
' seconds according to user choice.
' Please make sure that the path of the file to be changed is correct.
Private Sub cmddefaultwallpaper_Click()
ret = SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, "(None)", SPIF_UPDATEINIFILE Or SPIF_SENDWININICHANGE)
End Sub

Private Sub Form_Load()
Form1.WindowState = 1
ctr = 0
'_________________________________
Dim ret As Long
Dim filename As String
ctr = ctr + 1
If ctr > 20 Then ctr = 1
' c:\photos folder holds bmp files from wall1.bmp to wall20.bmp.
filename = "c:\photos\wall" & ctr & ".bmp"
ret = SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, filename, SPIF_UPDATEINIFILE Or SPIF_SENDWININICHANGE)
End Sub
}}}
تم الشكر بواسطة:



التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم