Basic Tutorial how to create Gadget for Thoosje Sidebar

Step 1:

Download & Install the latest version of Thoosje Sidebar
[Download Here]

Download & Install Visual Studio C#2010 .NET 4
[Download Here]

Download Drive Gadget Source (Optional To Experiment)
[Download Here]

Step 2 :
Open Visual Studio C# and Create a new Class Library Project and name it whatever you want


Step 3 :
In order to use the Thoosje Sidebar Gadget Functions we have to add Thoosje Sidebar.exe as a reference in the Project Solution

Step 4:

In the Add Reference Dialog select the Browse Tab and navigate to the directory where Thoosje Sidebar.exe is stored and add it


Step 5 :
Now we have to create a Loader class to connect our main Gadget Class to the Sidebar

Step 6 :

When the Loader.cs class is created we have to edit it a little
first we have to change the default name space of the Load class to the correct namespace CodeWonders

// Incorrect namespace
namespace ExampleGadget

// Correct namespace
namespace CodeWonders

Step 7 :

Rename the class to GadgetConnection

And last add the constructor

public Gadget GetGadget()
// ExampleGadget is the namespace of the example solution
// Class1 is the main gadget class of the example solution
return new ExampleGadget.Class1();

Step 8 :

Back to the main gadget class Class1 in this case

first add these namespaces on the top of your main gadget class

using CodeWonders.Sidebar;
using CodeWonders.Sidebar.Controls;

Step 9 :

make sure your class inherits from Gadget

namespace ExampleGadget

public class Class1 : Gadget



The Gadget Events and the GControl Events are used the same way as System.Windows.Forms events and mostly have the same names


Step 10 :

Building the Solution

Before building we have to set the proccessor architecture or there might be some problems when Thoosje Sidebar tries to load the gadget

Go to the Properties in your Project Solution and select the Build Tab

In the build properties set the Platform Target to x86

NOTE : before you build the project make sure Thoosje Sidebar.exe is closed otherwhise the build will not succeed

You can build the solution with F6 or with the Build Solution in the Visual Studio Build Menu


Step 11 :

Testing the Gadget with Thoosje Sidebar

First of all Start Thoosje Sidebar.exe and open the Gadget Manager
Go to the Developer Item in the Menu and select Run Gadget From .DLL

From the OpenFile Dialog navigate to your Project Solution directory output and select the Gadget.dll that was just Build

Step 12 :

The actual testing


Step 13

Export to Gadget to .cwgf file first go back to the Developer Menu Item in the Gadget Manager

The Create Gadget File Dialog will then popup

Where you can select your gadget.dll file and insert a tumbnail and basic gadget information

And then Apply with the Create Button to Save your gadget as a .cwgf file