I had this exact same problem and finally discovered that once you use the
FileName property, if you want to re-display the image, you'll need to set
the Document property, not FileName. For example, say you have a.tiff and
b.tiff. Your user clicks on a.tiff; you set FileName, which populates
Document object. Cache that Document object to a document variable. User
clicks b.tiff, you set FileName, etc. User clicks a.tiff again, and you will
need to "remember" that they've already clicked a.tiff and set Document
property to your cached variable instead of setting FileName property. Hope
this helps.
[quoted text, click to view] "dragoon" wrote:
> Hi,
>
> I'm trying to load a tiff in the MODI Viewer Control.
>
> the form (actually is a child form) is in C# and I'm using FileName Property
> to load the tiff.
> It loads, but if I close the child form and I try to open it again (with
> same source file), the Viewer displys nothing. Loading (only once) different
> documents (tiff images) is OK, but loading again same file is not.
>
> Also there is Document Property which loads an open document into the viewer
> control.
>
> I think that the file remains open in memory. How can I open it again using
> Document Property or how can I dispose it when I close the child form, so I
> can use only FileName Property of the control ?
>