Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

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.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -