Featured post
vb.net - How to revert Corporate Windows 7 Theme -
as christmas week side-project thought i'd knock quick console app can run windows start-up folder.
the application going delete unwanted global corporate desktop icons (i run clean desktop - common?) , reset windows 7 theme lovely visual studio 2010 graphics.
i have read reasons why shouldn't done pro grammatically user feel case different every morning manually deleting icons , resetting theme (policy not stopping - reapplying every morning) though little side project save me time in long term.
i deleting icons ok struggling set theme ala:
dim key registrykey = my.computer.registry.currentuser.opensubkey("software\microsoft\windows\currentversion\themes", true)
key.setvalue("currenttheme", "c:\users\myprofile\appdata\local\microsoft\windows\themes\vs2010.theme")
key.close()
this setting registry key correctly not applying it. suggestions how make work or alternatives appreciated. may try simple wallpaper set use theme if possible!
thanks
you'll have p/invoke make change. you'll need use setsystemvisualstyle
method.
<dllimport("uxtheme.dll", bestfitmapping:=false, callingconvention:=callingconvention.winapi, charset:=charset.unicode, entrypoint:="#65")> _ shared function setsystemvisualstyle(byval pszfilename string, byval pszcolor string, byval pszsize string, byval dwreserved integer) integer end function setsystemvisualstyle("c:\windows\resources\themes\luna\luna.msstyles", "metallic", "normalsize", 0)
pinvoke.net giving me problems right might need used cached page.
- Get link
- X
- Other Apps
Comments
Post a Comment