Search KB Filter article types
Images
Categories: Graphics & Pictures
Tags: Architects, Developers, Gateway, Resource Handlers, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
Revision: 1
Posted: 05/Nov/2009
Updated: 28/Oct/2010
Status: Publish
Types: Article

This article missing it's contents and needs writing.
Images - Using images in Visual WebGui

Overview

Visual WebGui is based on ASP.NET and is actually a web deployment platform.
As a result, images used in Visual WebGui need to be served by the server to the client and are not stored locally on the client (appart from some caching scenarios).

The Visual WebGui server is required to create a unique request path for every image it can serve.
these special request types are created by the Visual WebGui ResouceHandle.

Regular use

By default when adding images to your application through the Form designer, the designer looks for images in the Resources\Images and Resources\Icons directories located in the root directory of the VWG Application project. These locations can be reconfigured in the General tab of the project project properties page, under the "Directories" section. The result is that behind the scenes these images are created in the InitializeComponent method of the Form as ImageResourceHandle instances.
When using a Class Library project, the images still need to be located in the same place - in the location where the Web.config "Directory" items for the "Images" and "Icons" point to.

The default location of the Resource folder(s) can be changed using web.config settings.

Remember the folder names (Images, Icons etc.) set in web.config, they are case sensitive when used in code.

Special cases
  • Images located in a Database can be retreived using a DatabaseResourceHandle.
  • Images retrieved from other Virtual Directories can be retrieved using the UrlResourceHandle.
    Using the UrlResourceHandle, you will need to make sure your application has read access to that file in that Virtual Directory.
  • Images either dynamically generated or retreived from other locations can be used with the Visual WebGui Gateway.
Browsing for images in Library projects
Visual WebGui Version 6.3 and earlier

Library projects (Visual WebGui Library / WebGui Control Library) do not have a web.config file, so using the designer in those projects, to browse for images, will not work, as the designer has no knowledge of where to look for the Resources folder. To work around this limitation, you can simply make a copy of a web.config from any of your applications and paste it into the Library project and then browsing for images will look in the local Resources within the Library project (by default).

If needed, you can edit this new web.config file (within the Library project) and point the Resources folder to any accessible folder on your workstation.

At runtime, you must make sure the resources are accessible to your application, as at runtime then by default, those resources will have to be available within your application, unless they are embedded resources or your application is using a gateway to retrieve them from non-default application Resource folders.

Visual WebGui Version 6.4 and later

In version 6.4 and later, the version 6.3 method above will work quite well, but the prefered method is to set the "Config File Path" property within the General tab of a Library Project. Use this path to point to a web.config file (in your application project as an example) and the designer will browse for images within that application project, based on the settings for paths to Resources folder within that web.config file.

If a "Config File Path" is set for a Library project and you have a web.config file (based on the 6.3 method) within the project, the local web.config file will override the "Config file path" setting.

ReferencesForum threadsCode samples
Other references


About the author

Related Articles

Graphics & Pictures  
Title Update Author
Tags: Architects, Developers, Gateway, Resource Handlers, 1. Beginner, 2. Intermediate, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
02/Jan/2009    2009/01/02
This code snippet demonstrates creation of a custom control with new client side events which are handled on the client by the custom control's client's script.
Tags: Developers, Events, Gateway, JavaScript, 1. Beginner, 2. Intermediate, Customization, Pre v6.3, v6.3, 3. Advanced, v6.4 and Later
28/Dec/2010    2010/12/28
Tags: Architects, Developers, Gateway, Resource Handlers, 1. Beginner, 2. Intermediate, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
12/Jan/2007    2007/01/12
This article demonstrates the use of an active Gauge in a Visual WebGui application.
Tags: Developers, 1. Beginner, 2. Intermediate, 3. Advanced, v6.3, v6.4 and Later
12/Jan/2009    2009/01/12
Tags: Developers, Gateway, 1. Beginner, 2. Intermediate, 3. Advanced, v6.3, v6.4 and Later
17/Nov/2010    2010/11/17
Tags: Architects, Developers, Gateway, Resource Handlers, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
04/Dec/2010    2010/12/04
.NET Web, Cloud and Mobile application delivery platform | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2011 Visual WebGui®       Visual WebGui weblog on ASP.NET Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS