Hi,
The GDI+ error is caused by the fact that you are disposing of image and document streams when they are being loaded (note that they are loaded asynchronously). I have removed the "Using" statement from your code and that fixed the issue. As for the OutOfMemoryException, it is caused by the logo image insertion:
[VB.NET]If LogoImg IsNot Nothing Then Dim rangePos = txtTesto.Document.FindAll("<@LogoCliente@>", API.Native.SearchOptions.None) If rangePos.Length > 0 Then Dim img = txtTesto.Document.InsertImage((rangePos(0).Start), LogoImg) img.ScaleX = 0.5 img.ScaleY = 0.5 End If End If txtTesto.Document.ReplaceAll("<@LogoCliente@>", "", API.Native.SearchOptions.None)
I will contact our developers regarding this issue and let you know once we have any results.
Thanks,
Alessandro.
Hi,
as you sgggests, I got rid of all the "using" in my code, in order to avoid disposing objects still needed.
Now, with this change, I get only one type of error: the Out Of Memory one.
In attachment, I put the new code.
Hoping this could be solved soon.
Thanks.
Hello Andrea,
I am glad to inform you that our developers have managed to fix this issue. The fix will be available with the next XtraRichEdit Suite update (v2011 vol 2.9). Your application will operate without an OutOfMemoryException with this update. You can request a public fix immediately (prior to the official release) if this is a matter of urgency for you. For more details about this service, please read Julian's blog at Getting your fix: the DevExpress way .
Thanks,
Alessandro.
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.