Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, April 2, 2009 2:33:55 PM(UTC)
apistocchi

Groups: Registered
Posts: 4


Hello, i'm trying to change the image displayed in a RasterImageViewer contrrol selecting from a RasterImagelist with VB6 and .NET interoperability V16. The problem when i select a different image for the second time, the RasterImageViewer content change but, i get an exception. Attached a little sampe and below text of exception:

System.NullReferenceException: Riferimento a un oggetto non impostato su un'istanza di oggetto.
   in Leadtools.RasterImage.GetImageWidthDpi(Boolean useDpi)
   in Leadtools.WinForms.RasterImageList.a(Graphics A_0, RasterImageListItem A_1, Rectangle A_2)
   in Leadtools.WinForms.RasterImageList.b(Graphics A_0, RasterImageListItem A_1, Rectangle A_2)
   in Leadtools.WinForms.RasterImageList.e(Graphics A_0, RasterImageListItem A_1, Rectangle A_2)
   in Leadtools.WinForms.RasterImageList.OnPaint(PaintEventArgs e)
   in System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
   in System.Windows.Forms.Control.WmPaint(Message& m)
   in System.Windows.Forms.Control.WndProc(Message& m)
   in Leadtools.WinForms.RasterImageList.WndProc(Message& m)
   in System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   in System.Windows.Forms.Control.ActiveXImpl.System.Windows.Forms.IWindowTarget.OnMessage(Message& m)
   in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Thanks




File Attachment(s):
ImgList.zip (1,100kb) downloaded 18 time(s).
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Friday, April 3, 2009 10:51:30 AM(UTC)

Walter  
Walter

Groups: Tech Support, Administrators
Posts: 368

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)

Hello,

The RasterImageViewer will automatically dispose of any image it has access to when the image is changed.

To fix this, you either need to give the image viewer a copy of the image each time you assign it a new image, or set the AutoDisposeImage property to false, like this:
lrvMain.AutoDisposeImages = False
File Attachment(s):
ImgList_modified.zip (1,100kb) downloaded 21 time(s).
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#3 Posted : Monday, April 6, 2009 1:20:45 PM(UTC)
apistocchi

Groups: Registered
Posts: 4


Yes, you're right, thanks.
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.136 seconds.