- Aurigma Graphics Mill 5.5 for .NET
- Introduction
- What's New?
- Overview of Features
- Getting Started
- Programming with Graphics Mill for .NET
- Image Processing with Graphics Mill for .NET
- Using Graphics Mill for .NET in Windows Applications
- Using Graphics Mill for .NET in Web Applications
- FAQ: Using Graphics Mill for .NET
- File Formats
- Graphics Mill for .NET Add-ons
- Class Library Reference
- Samples
- Licensing
- Copyright Notices
This documentation is for the old version. Go to the latest Graphics Mill docs
Quick Start in Web Forms
This topic describes how to get started with Graphics Mill for .NET when creating an ASP.NET application. It provides step-by-step instructions how to create a simple Web Forms application which loads an image and displays it.
- Create new Web site in the Visual Studio 2005 (menu File -> New -> Web Site).
- Add the BitmapViewer
control to the toolbox:
- Right click the component toolbox and select Choose Items.
- Find the BitmapViewer component in the .NET Framework
Components tab. If you cannot find this component for some reason, click
the Browse button and find the
Aurigma.GraphicsMill.WebControls.dll assembly. It should be
looking as follows:
- Find
BitmapViewer item at the toolbox and drag it at the form. As a
result, the form should be looking similar to this screenshot:
- Create a folder named Photos and put some photo there. In our case it is the Sample.jpg file.
- Click anywhere on the form in order to generate a handler for the Load
event of the Page object and add the code which will load the sample
photo:
Visual BasicPrivate Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load BitmapViewer1.Bitmap.Load(Server.MapPath("Photos/Sample.jpg")) End SubC#private void Page_Load(object sender, System.EventArgs e) { BitmapViewer1.Bitmap.Load(Server.MapPath("Photos/Sample.jpg")); } - Toggle to the Source mode and change the
doctype of the page from XHTML 1.0 Transitional:
HTMLto HTML 4.0 Transitional:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">HTMLAlso, remove XHTML namespace declaration from the <html> tag, i.e. replace this:<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >HTMLby this one:<html xmlns="http://www.w3.org/1999/xhtml">HTML<html>RemarkThis step is necessary as a workaround of a problem with scrollbars which occurs in Internet Explorer 6. This problem is caused by a bug in Internet Explorer which misbehaves with certain XHTML code. It does not occur on other browsers such as Firefox, Mozilla, Safari, and Opera.
- Run the application (menu Debug -> Start Without Debugging or Ctrl+F5 shortcut).
After you run the application and load some image, it will be looking like this screenshot: