|
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
OverviewVisual 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 useBy 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 earlierLibrary 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 laterIn 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
|
|
|
Tags:
Architects, Developers, Gateway, Resource Handlers, 1. Beginner, 2. Intermediate, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
|
|
|
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
|
|
|
Tags:
Architects, Developers, Gateway, Resource Handlers, 1. Beginner, 2. Intermediate, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
|
|
|
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
|
|
|
Tags:
Developers, Gateway, 1. Beginner, 2. Intermediate, 3. Advanced, v6.3, v6.4 and Later
|
|
|
Tags:
Architects, Developers, Gateway, Resource Handlers, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
|
|
|
|