After defining imageZoom, one can use it wherever it's needed:
PictureBoxZoom = Function( {filename},
window:img = Open( filename, "jpg" );
Graph Box(
frameSize( 300, 300 ),
SuppressAxes,
<<AddImage( Image( window:img ), Fill Graph, Lock( 1 ) )
);
);
New Window( "Image",
Outline Box( "Zoom Image",
Text Box( "press CTRL to zoom"),
PictureBoxZoom( "$SAMPLE_IMAGES/tile.jpg" )
)
);