Set desktop background color
Posted: Wed May 31, 2017 3:16 pm
I'm trying to set the desktop background color to red (no wallpaper), using this code which fails:
I can't find anything with Google to explain what error 998 means. 
According to this VB article, the code above should work without problem:
http://allapi.mentalis.org/tips/tip8.shtml
Any suggestions? Thanks.
Code: Select all
If SetSysColors_(1,#COLOR_BACKGROUND,RGB(255,0,0))=0
Debug GetLastError_() ; Returns 998
EndIf

According to this VB article, the code above should work without problem:
http://allapi.mentalis.org/tips/tip8.shtml
Any suggestions? Thanks.