Starcraft
February 10th, 2000, 09:36 AM
how do i change the windows backround through vb code, apparently, www.freevbcode.com and www.vbcode.com arent working right now.
|
Click to See Complete Forum and Search --> : Windowz Backroundz Starcraft February 10th, 2000, 09:36 AM how do i change the windows backround through vb code, apparently, www.freevbcode.com and www.vbcode.com arent working right now. Chris Eastwood February 10th, 2000, 09:45 AM Place a button on a form and then copy in the following code : option Explicit ' 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 ' private Const SPIF_SENDWININICHANGE = &H2 private Const SPIF_UPDATEINIFILE = &H1 private Const SPI_SETDESKWALLPAPER = 20 ' private Sub Command1_Click() ' Dim r as Long ' ' Replace the 'c:\winnt\winnt256.bmp' with your required file ' Call SystemParametersInfo(SPI_SETDESKWALLPAPER, _ 0&, _ "c:\winnt\winnt256.bmp", _ SPI_SETDESKWALLPAPER Or _ SPIF_UPDATEINIFILE) ' End Sub Note: This won't appear to work if the user has the ActiveDesktop enabled. Chris Eastwood CodeGuru - the website for developers http://codeguru.developer.com/vb codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |