# Quick Start

Better Thumbnail Browser for .NET (C#, VB) - Image thumbnail viewing and loading control
Download More Info

## Table of Contents

## Tutorial Prerequisites

- Visual Studio 2012 / 2010 / 2008 / 2005

- .NET Framework 4.5 / 4.0 / 3.5 / 3.0 / 2.0 (Compact Framework is not supported)

- Visual C# or Visual Basic

## Step-by-step Tutorial

Start with a new "Windows Forms Application" project. A designer with empty Form appears. Display the Toolbox window (View - Toolbox):

The Toolbox should contain a new tab called "ComponentOwl" containing all the installed component from ComponentOwl, including Better Thumbnail Browser.

If you chose not to integrate component in Visual Studio during installation or the component have not been successfully integrated, please follow the next steps.

Right-click on empty area of the Toolbox window and select "Choose Items...":

In the "Choose Toolbox Items" dialog, select the ".NET Framework Components" tab. If the comonent has been properly installed, it will be already listed here. If you find it, make sure the newest version is checked (e.g. 2.5.2.0 instead of 1.0.0.0) and click "OK":

If you need other than installed version (e.g. DLL to match for specific .NET Framework version) click on the "Browse..." button:

Browse for the betterthumbnailbrowser.dll file containing the component.

The location depends on where you installed the product. The default location is:

    C:\Program Files\Component Owl\Better ListView\Redistributable

You can choose the file right within "Redistributable" folder. This is .NET 2.0 component compatible with .NET Framework 2.0 or higher. If you want binary for a specific .NET version or Client Profile, choose the file from ".NET Framework Specific" folder:

Make sure the check box next to "BetterListView" is checked and click "OK":

Now the component should appear in your Toolbox:

Select the component and place it on designer surface:

Now you can design Better Thumbnail Browser the same way as any other control:

## Installation Troubleshooting

If the component does not appear in Toolbox, make sure that your target framework version is a full-featured .NET Framework 2.0, 3.0, 3.5 or 4.0. The Compact Framework is not supported.

You can also try the "Reset Toolbox" option from the Toolbox context menu, restart Visual Studio and try to add the control again.

Sometimes even the Toolbox can get corrupted (known issue on Visual Studio 2010) and its cache needs to be cleared. Simply remove all ".tbd" files from this folder:

Vista/Windows 7:

    \Users\<user>\AppData\Local\Microsoft\VisualStudio\10.0\*.tbd

Windows XP:

    \Documents and Settings\<user directory>\Local Settings\Application Data\Microsoft\VisualStudio\10.0\*.tbd

Make sure the Visual Studio is not running when removing the files. The Toolbox should reload its default items when opened.

## Activation

By default, Better Thumbnail Browser runs in trial mode. The only limitations of trial version are watermark displayed on the control...

and an Activation Dialog, that appears on every application run:

There are three possible actions:

- Purchase - obtain serial key for Better ThumbnailBrowser to activate it

- Activate - enter serial key to obtain license

- Continue (or close the dialog) - skip this dialog and start using Better Thumbnail Browser

When activating Better Thumbnail Browser, you are asked for a serial key (obtained by pruchasing Better Thumbnail Browser):

Internet connection is required to activate Better ThumbnailBrowser. If you need to activate the product off-line, please contact us.

When the Better Thumbnail Browser is activated, it uses the standard licensing scheme of .NET. When a form is created or opened in Windows Forms Designer, a licenses.licx file is updated in your project and the trial version notification disappears.

## Offline Activation

If the activation is blocked by a firewall or proxy server, you can activate Better Thumbnail Browser offline.

First, call the following static method from code:

    BetterThumbnailBrowser.ShowOfflineActivationDialog()

A dialog appears containing your computer ID:

Please copy this code to clipboard (Control+C) and send us the code along with your serial number you obtained when purchased the product to support@componentowl.com.

The serial number is a 16-character code the identifies your purchased product, e.g.:

    5KTPNX6QNJBZNJTL

The computer ID is rather longer code that is unique to your machine:

    6780f65cb1b86f9a10dacc662906c3d371ab4abc

With this information, we will generate a license file and send it to back to you via e-mail.

You can find a file license-btb.dat in the e-mail attachment we send in reply. Please copy this file in the following path (and create the folder Component Owl if it does not exist):

Windows 7, 8, Vista:

    c:\ProgramData\Component Owl\

Windows XP:

    c:\Documents and Settings\All Users\Application Data\Component Owl\

Now just rebuild the project referencing Better Thumbnail Browser and you are done.

Please note the license works for specific product and specific computer. It won't work on other machines or with other Component Owl's products. You need to activate Better Thumbnail Browser for each machine on which you want to build projects.

## Updating to Newer Version of Better Thumbnail Browser

If a new version of Better Thumbnail Browser is released, to update to newer version, simply download and install the new version. The installer will prompt for updating to a new version.

The DLL with the component (betterthumbnailbrowser.dll) is installed usually in Program Files folder, so if you use copies of the library on other locations on your disk, replace the old copies with the new version.

The licenses.licx file in your project may also point to an older version of Better Thumbnail Browser. To update licenses.licx open some form with Better ThumbnailBrowser in Windows Forms Designer and compile. A new line will be added to the licenses.licx for the new version of the Better ThumbnailBrowser. You can delete the line with the reference to older version, e.g.:

    ComponentOwl.ThumbnailBrowser.ThumbnailBrowser, ThumbnailBrowser, Version=1.4.0.0, Culture=neutral, PublicKeyToken=e6c91a3add447be2

should be switched to:

    ComponentOwl.ThumbnailBrowser.ThumbnailBrowser, ThumbnailBrowser, Version=2.7.0.0, Culture=neutral, PublicKeyToken=e6c91a3add447be2

if 2.7.0.0 is the updated version of Better ThumbnailBrowser. You can do the update of licenses.licx file with text editor within Visual Studio, if you know the new version number.

If you use Better Thumbnail Browser in separate project, you need to copy licenses.licx file to the main project as well.

## Starting with Better ThumbnailBrowser

Better Thumbnail Browser inherits from Better ListView control, which is made as similar to regular .NET ListView as possible while having all its extra features. Better Thumbnail Browser uses its own item type - BetterThumbnailBrowserItem (which inherits from BetterListViewItem). Please keep this in mind when filling the control with thumbnail items. For other types, see the following rules of thumb:

- Most structures are named equally as in .NET ListView, only with Better- prefix (e.g. BetterListViewSubItem instead of ListViewSubItem).

- Better ListView does not use the same structures and classes as .NET ListView (e.g. use ComponentOwl.BetterListView.BetterListViewView instead of System.Windows.Forms.View).

- Many features and structures of Better Thumbnail Browser (or Better ListView) are richer (e.g. insertion mark, Drag and Drop functionality). The types contain extra overrides for constructors, methods and properties. They should be sometimes used differently and they behave little bit differently; look in the documentation first to avoid confusion.

To compare usage of .NET ListView and Better Thumbnail Browser, consider the following code using Better Thumbnail Browser instead of the regular .NET ListView.

C#

    BetterThumbnailBrowser thumbnailBrowser = new BetterThumbnailBrowser();

    BetterThumbnailBrowserItem item = new BetterThumbnailBrowserItem("new thumbnail item");

    thumbnailBrowser.Items.Add(item);

    thumbnailBrowser.View = BetterListViewView.List;

    // ...

    BetterListViewHitTestInfo hitTestInfo = thumbnailBrowser.HitTest(new Point(0, 0));

Visual Basic

    Dim thumbnailBrowser As New BetterThumbnailBrowser()

    Dim item As New BetterThumbnailBrowserItem("new item")

    thumbnailBrowser.Items.Add(item)

    thumbnailBrowser.View = BetterListViewView.List

    ' ...

    Dim hitTestInfo As BetterListViewHitTestInfo = thumbnailBrowser.HitTest(New Point(0, 0))

## Learning resources and getting support

The documentation and learning resources include:

- HTML documentation (the Quick Start guide you are reading right now is the second chapter)

- Sample projects in C# and VB.NET

- Samples Explorer

- Class Reference (technical documentation)

You can find all these resources in Start Menu - Component Owl - Better Thumbnail Browser.

The C# and Visual Basic Samples are located at:

Vista/Windows 7:

    \Users\<user>\Documents\ComponentOwl\Better ListView Samples

Windows XP:

    \Documents and Settings\<user directory>\My Documents\ComponentOwl\Better ListView Samples

Make sure the Visual Studio is not running when removing the files. The Toolbox should reload its default items when opened.

We will happily answer any of your questions and provide further assistance. Just email us at support@componentowl.com. Or, you can use the online form at www.componentowl.com/support.

Better Thumbnail Browser for .NET (C#, VB) - Image thumbnail viewing and loading control
Download More Info