myLink is a WebLink object on the web page. File is a WebLink property defined in the webpage.
dim p as Picture = LogoMBS(500)
dim w as new WebPicture(p)
w.Filename = "image.png"
file = w
myLink.Target = myLink.kTargetNewWindow
myLink.URL = w.URL
The link now opens in a new browser window or a new tab. For a PDF or image file, this will show it directly in the browser and not start a new download.