var BmpPath: PChar; begin BmpPath := 'C:TempTest.bmp'; SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, BmpPath, SPIF_UPDATEINIFILE); end; 函数原型 BOOL WINAPI SystemParametersInfo( _In_ UINT uiAction, _In_ UINT uiParam, _Inout_ PVOID pvParam, _In_ UINT fWinIni ); SPI_GETBEEP = 1; {} SPI_SETBEEP = 2; {} SPI_GETMOUSE = 3; {} SPI_SETMOUSE = 4; {} SPI_GETBORDER = 5; {} SPI_SETBORDER = 6; {} SPI_GETKEYBOARDSPEED = 10; {} SPI_SETKEYBOARDSPEED = 11; {} SPI_LANGDRIVER = 12; {} SPI_ICONHORIZONTALSPACING = 13; {} SPI_GETSCREENSAVETIMEOUT = 14; {} SPI_SETSCREENSAVETIMEOUT = 15; {} SPI_GETSCREENSAVEACTIVE = $10; {} SPI_SETSCREENSAVEACTIVE = 17; {} SPI_GETGRIDGRANULARITY = 18; {} SPI_SETGRIDGRANULARITY = 19; {} SPI_SETDESKWALLPAPER = 20; {} SPI_SETDESKPATTERN = 21; {} SPI_GETKEYBOARDDELAY = 22; {} SPI_SETKEYBOARDDELAY = 23; {} SPI_ICONVERTICALSPACING = 24; {} SPI_GETICONTITLEWRAP = 25; {} SPI_SETICONTITLEWRAP = 26; {} SPI_GETMENUDROPALIGNMENT = 27; {} SPI_SETMENUDROPALIGNMENT = 28; {} SPI_SETDOUBLECLKWIDTH = 29; {} SPI_SETDOUBLECLKHEIGHT = 30; {} SPI_GETICONTITLELOGFONT = 31; {} SPI_SETDOUBLECLICKTIME = $20; {} SPI_SETMOUSEBUTTONSWAP = 33; {} SPI_SETICONTITLELOGFONT = 34; {} SPI_GETFASTTASKSWITCH = 35; {} SPI_SETFASTTASKSWITCH = 36; {} SPI_SETDRAGFULLWINDOWS = 37; {} SPI_GETDRAGFULLWINDOWS = 38; {} SPI_GETNONCLIENTMETRICS = 41; {} SPI_SETNONCLIENTMETRICS = 42; {} SPI_GETMINIMIZEDMETRICS = 43; {} SPI_SETMINIMIZEDMETRICS = 44; {} SPI_GETICONMETRICS = 45; {} SPI_SETICONMETRICS = 46; {} SPI_SETWORKAREA = 47; {} SPI_GETWORKAREA = 48; {} SPI_SETPENWINDOWS = 49; {} SPI_GETHIGHCONTRAST = 66; {} SPI_SETHIGHCONTRAST = 67; {} SPI_GETKEYBOARDPREF = 68; {} SPI_SETKEYBOARDPREF = 69; {} SPI_GETSCREENREADER = 70; {} SPI_SETSCREENREADER = 71; {} SPI_GETANIMATION = 72; {} SPI_SETANIMATION = 73; {} SPI_GETFONTSMOOTHING = 74; {} SPI_SETFONTSMOOTHING = 75; {} SPI_SETDRAGWIDTH = 76; {} SPI_SETDRAGHEIGHT = 77; {} SPI_SETHANDHELD = 78; {} SPI_GETLOWPOWERTIMEOUT = 79; {} SPI_GETPOWEROFFTIMEOUT = 80; {} SPI_SETLOWPOWERTIMEOUT = 81; {} SPI_SETPOWEROFFTIMEOUT = 82; {} SPI_GETLOWPOWERACTIVE = 83; {} SPI_GETPOWEROFFACTIVE = 84; {} SPI_SETLOWPOWERACTIVE = 85; {} SPI_SETPOWEROFFACTIVE = 86; {} SPI_SETCURSORS = 87; {} SPI_SETICONS = 88; {} SPI_GETDEFAULTINPUTLANG = 89; {} SPI_SETDEFAULTINPUTLANG = 90; {} SPI_SETLANGTOGGLE = 91; {} SPI_GETWINDOWSEXTENSION = 92; {} SPI_SETMOUSETRAILS = 93; {} SPI_GETMOUSETRAILS = 94; {} SPI_SCREENSAVERRUNNING = 97; {} SPI_GETFILTERKEYS = 50; {} SPI_SETFILTERKEYS = 51; {} SPI_GETTOGGLEKEYS = 52; {} SPI_SETTOGGLEKEYS = 53; {} SPI_GETMOUSEKEYS = 54; {} SPI_SETMOUSEKEYS = 55; {} SPI_GETSHOWSOUNDS = 56; {} SPI_SETSHOWSOUNDS = 57; {} SPI_GETSTICKYKEYS = 58; {} SPI_SETSTICKYKEYS = 59; {} SPI_GETACCESSTIMEOUT = 60; {} SPI_SETACCESSTIMEOUT = 61; {} SPI_GETSERIALKEYS = 62; {} SPI_SETSERIALKEYS = 63; {} SPI_GETSOUNDSENTRY = 64; {} SPI_SETSOUNDSENTRY = 65; {} SPI_GETSNAPTODEFBUTTON = 95; {} SPI_SETSNAPTODEFBUTTON = 96; {} SPI_GETMOUSEHOVERWIDTH = 98; {} SPI_SETMOUSEHOVERWIDTH = 99; {} SPI_GETMOUSEHOVERHEIGHT = 100; {} SPI_SETMOUSEHOVERHEIGHT = 101; {} SPI_GETMOUSEHOVERTIME = 102; {} SPI_SETMOUSEHOVERTIME = 103; {} SPI_GETWHEELSCROLLLINES = 104; {} SPI_SETWHEELSCROLLLINES = 105; {} SPI_GETMENUSHOWDELAY = 106; {} SPI_SETMENUSHOWDELAY = 107; {} SPI_GETSHOWIMEUI = 110; {} SPI_SETSHOWIMEUI = 111; {} SPI_GETMOUSESPEED = 112; {} SPI_SETMOUSESPEED = 113; {} SPI_GETSCREENSAVERRUNNING = 114; {} SPI_GETACTIVEWINDOWTRACKING = $1000; {} SPI_SETACTIVEWINDOWTRACKING = $1001; {} SPI_GETMENUANIMATION = $1002; {} SPI_SETMENUANIMATION = $1003; {} SPI_GETCOMBOBOXANIMATION = $1004; {} SPI_SETCOMBOBOXANIMATION = $1005; {} SPI_GETLISTBOXSMOOTHSCROLLING = $1006; {} SPI_SETLISTBOXSMOOTHSCROLLING = $1007; {} SPI_GETGRADIENTCAPTIONS = $1008; {} SPI_SETGRADIENTCAPTIONS = $1009; {} SPI_GETKEYBOARDCUES = $100A; {} SPI_SETKEYBOARDCUES = $100B; {} SPI_GETMENUUNDERLINES = SPI_GETKEYBOARDCUES; SPI_SETMENUUNDERLINES = SPI_SETKEYBOARDCUES; SPI_GETACTIVEWNDTRKZORDER = $100C; {} SPI_SETACTIVEWNDTRKZORDER = $100D; {} SPI_GETHOTTRACKING = $100E; {} SPI_SETHOTTRACKING = $100F; {} SPI_GETMENUFADE = $1012; {} SPI_SETMENUFADE = $1013; {} SPI_GETSELECTIONFADE = $1014; {} SPI_SETSELECTIONFADE = $1015; {} SPI_GETTOOLTIPANIMATION = $1016; {} SPI_SETTOOLTIPANIMATION = $1017; {} SPI_GETTOOLTIPFADE = $1018; {} SPI_SETTOOLTIPFADE = $1019; {} SPI_GETCURSORSHADOW = $101A; {} SPI_SETCURSORSHADOW = $101B; {} SPI_GETMOUSESONAR = $101C; {} SPI_SETMOUSESONAR = $101D; {} SPI_GETMOUSECLICKLOCK = $101E; {} SPI_SETMOUSECLICKLOCK = $101F; {} SPI_GETMOUSEVANISH = $1020; {} SPI_SETMOUSEVANISH = $1021; {} SPI_GETFLATMENU = $1022; {} SPI_SETFLATMENU = $1023; {} SPI_GETDROPSHADOW = $1024; {} SPI_SETDROPSHADOW = $1025; {} SPI_GETUIEFFECTS = $103E; {} SPI_SETUIEFFECTS = $103F; {} SPI_GETFOREGROUNDLOCKTIMEOUT = $2000; {} SPI_SETFOREGROUNDLOCKTIMEOUT = $2001; {} SPI_GETACTIVEWNDTRKTIMEOUT = $2002; {} SPI_SETACTIVEWNDTRKTIMEOUT = $2003; {} SPI_GETFOREGROUNDFLASHCOUNT = $2004; {} SPI_SETFOREGROUNDFLASHCOUNT = $2005; {} SPI_GETCARETWIDTH = $2006; {} SPI_SETCARETWIDTH = $2007; {} SPI_GETMOUSECLICKLOCKTIME = $2008; {} SPI_SETMOUSECLICKLOCKTIME = $2009; {} SPI_GETFONTSMOOTHINGTYPE = $200A; {} SPI_SETFONTSMOOTHINGTYPE = $200B; {} SPIF_UPDATEINIFILE = 1; {} SPIF_SENDWININICHANGE = 2; {} SPIF_SENDCHANGE = SPIF_SENDWININICHANGE;