Using a Pan Window (Visual Basic Script)
Take the following steps to add a Pan Window to your page:
| 
 1.  | 
 Start with the project that you created in Loading and Displaying an Image.  | 
| 
 2.  | 
 Add the following code between the <FORM> </FORM> tags to add the button btnPanWnd:  | 
<INPUT TYPE="button" NAME="btnPanWnd" VALUE="Pan Window" LANGUAGE="VBScript"
      OnClick="PanWnd">
| 
 3.  | 
 Delete the following line from the Window_OnLoad subroutine:  | 
Lead1.PaintSizeMode = PAINTSIZEMODE_FIT
| 
 4.  | 
 Add the following code between the <SCRIPT> </SCRIPT> tags for the btnPanWnd button:  | 
Sub PanWnd()
   With LEADRasterView1
         .BackErase = False
          'set the location of the PanWindow
         .PanWinX = 100
         .PanWinY = 100
          'set the size of the PanWindow
          'requested width
         .PanWinWidth = 150
          'requested height
         .PanWinHeight = 200
         .PanWinTitle = "PanWindow"
         .PanWinRectColor = RGB(0, 0, 255) 
         .PanWinSysMenu = True
          'use the settings for LEADRasterView1. 
         .PanWinPaintPalette = .PaintPalette
         .PanWinBitonalScaling = .BitonalScaling
         .PanWinPaintScaling = .PaintScaling
         .PanWinPaintDither = .PaintDither
          'show the Pan Window
         .ShowPanWin True
   End With   
End Sub
| 
 5.  | 
 Run your page to test it.  |