Place a SplitContainer on a Form (e.g. SplitContainer1).
Fill left side of the SplitContainer with a GDViewer Control (e.g. GdViewerL).
Now place 2 Buttons on the form (Button1 & Button2).
In the first button fill GDView Controls with an Image and release the Image afterwards:
Code: Select all
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim aktImgL As Integer
aktImgL = m_GdPictureImaging.CreateGdPictureImageFromFile("E:\12 Weird Tattoos of 2011 11.jpg", False)
GdViewerL.DisplayFromGdPictureImage(aktImgL)
m_GdPictureImaging.ReleaseGdPictureImage(aktImgL)
End Sub
Code: Select all
Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
SplitContainer1.Panel2Collapsed = Not (SplitContainer1.Panel2Collapsed)
End Sub
Now you will get a "Not enough memory to render the document." error everytime you click on button2.
Strange isn't it?
Visual Studio 10
GDPicture 11
Tested on multiple Windows PC's
Greetz
Rainman