- imageUrl
- The URL or virtual directory of the image being loaded.
- pageIndex
- 0-based index of the page to open.
Visual Basic (Declaration) | |
---|---|
Overloads Public Sub OpenImageUrl( _ ByVal imageUrl As String, _ ByVal pageIndex As Integer _ ) |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As WebImageViewer Dim imageUrl As String Dim pageIndex As Integer instance.OpenImageUrl(imageUrl, pageIndex) |
Parameters
- imageUrl
- The URL or virtual directory of the image being loaded.
- pageIndex
- 0-based index of the page to open.
This example initializes the WebImageViewer control and load the third page of "multipage.tif", also it initializes the WebImagePanViewer control.
Visual Basic | ![]() |
---|---|
Public Sub WebImageViewer_OpenImageUrl(ByVal mainWebImageViewer As WebImageViewer, ByVal webImagePanViewer As WebImagePanViewer) mainWebImageViewer.InteractiveZoomPercent = 15 mainWebImageViewer.MouseInteractiveMode.LeftButton = ImageViewerMouseInteractiveMode.ZoomIn mainWebImageViewer.MouseInteractiveMode.RightButton = ImageViewerMouseInteractiveMode.ZoomOut mainWebImageViewer.ScaleFactor = 1.5 mainWebImageViewer.TileSize = New Size(450, 450) mainWebImageViewer.OpenImageUrl("Resources\multipage.tif", 2) webImagePanViewer.HorizontalAlignMode = ImageViewerAlignMode.Center webImagePanViewer.VerticalAlignMode = ImageViewerAlignMode.Center webImagePanViewer.RectangleColor = Color.Blue webImagePanViewer.ViewerID = mainWebImageViewer.ClientID End Sub |
C# | ![]() |
---|---|
public void WebImageViewer_OpenImageUrl(WebImageViewer mainWebImageViewer, WebImagePanViewer webImagePanViewer) { mainWebImageViewer.InteractiveZoomPercent = 15; mainWebImageViewer.MouseInteractiveMode.LeftButton = ImageViewerMouseInteractiveMode.ZoomIn; mainWebImageViewer.MouseInteractiveMode.RightButton = ImageViewerMouseInteractiveMode.ZoomOut; mainWebImageViewer.ScaleFactor = 1.5; mainWebImageViewer.TileSize = new Size(450, 450); mainWebImageViewer.OpenImageUrl(@"Resources\multipage.tif", 2); webImagePanViewer.HorizontalAlignMode = ImageViewerAlignMode.Center; webImagePanViewer.VerticalAlignMode = ImageViewerAlignMode.Center; webImagePanViewer.RectangleColor = Color.Blue; webImagePanViewer.ViewerID = mainWebImageViewer.ClientID; } |
JavaScript | ![]() |
---|---|
function WebImageViewer_OpenImageUrl(mainWebImageViewer) { mainWebImageViewer.setInteractiveZoomPercent(15); mainWebImageViewer.getMouseInteractiveMode().setLeftButton(ImageViewerMouseInteractiveMode.ZoomIn); mainWebImageViewer.getMouseInteractiveMode().setRightButton(ImageViewerMouseInteractiveMode.ZoomOut); mainWebImageViewer.setScaleFactor(1.5); mainWebImageViewer.setUseDpi(false); mainWebImageViewer.setTileSize(new ltwfSize(450, 450)); mainWebImageViewer.OpenImageUrl("Resources\\multipage.tif", 2); } |
If the imageUrl refers to an URL, the control will download the first page (index 0) to the CacheFolder and display it. Accessing the ImageInfo property returns the name of the cached image for this URL.
Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7