Updating Windows Sidebar Gadgets

I am trying to develop a Windows Desktop widget for Windows 7. It is just interesting if there is an easy way to reload the widget or have some kind of debugging code that will reload the widget every 10 seconds.

I ask when developing a widget, if I change something, I need to close the widget and read on the desktop to show my changes.

Greetings.

+4
source share
2 answers

You only need to restart the gadget after making changes to it?

In the Heterodox Visual Studio Gadget Template, the author has compiled a gadget template in which the aC # project is connected, which binds and deploys your gadget when you start it.

As an alternative, you might be interested in the link to the page: Create a Vista Gadget Using the Visual Studio Development Environment

Both involve using Visual Studio, which may not be your preferred development method, but you can get Visual Web Developer Express for free from Microsoft, and I know that the template works in that.

+3
source

I do this using a simple batch file that kills the sidebar.exe file, copies the unpacked gadget files, and reloads the sidebar.exe file. This method also saves settings between gadget updates.

This is a batch file. You will need to change src and dst accordingly. You may need to run it from an elevated command prompt if you have not disabled UAC.

@setlocal @echo off :: Kill the current sidebar process taskkill /f /im sidebar.exe :: Update files set src="%CD%\source" set dst="%USERPROFILE%\appdata\local\microsoft\windows sidebar\gadgets\YourGadget.gadget" xcopy /s /y %src% %dst% :: Relaunch sidebar start "" "%ProgramFiles%\Windows Sidebar\sidebar.exe" @endlocal 
+8
source

All Articles