471,330 Members | 1,607 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

VB6 --> VB,NET

Hi All
I'm making an upgrade of a program developed in VB6 to VB.NET and I've found
among other many problems one with the upgrade of the objects "ImageList"
I've an object ImageList in a form to which in design I've put the images
that we have available in the whole application
Then in other form I put in run-time another object ImageList into which I
incorporate the images from primary ImageList that are used in the form
On having used the "Upgrade Wizard" it does not give any compilation error .
The objects ImageList AxMSComctlLib defines as "AxMSComctlLib.AxImageList"
When I execute the program and it comes to the instruction of adding the
image the following mistake is produced:

An unhandled exception of type 'System.Runtime.InteropServices.COMException'
occurred in Project1.exe

Additional information: Property is read-only

The code in VB.NET executing is:

Dim picImage As MSComctlLib.IImage

With imlaux
..ListImages.Clear()
..ImageHeight = imgImages.ImageHeight
..ImageWidth = imgImages.ImageWidth
..UseMaskColor = imgImages.UseMaskColor
..BackColor = imgImages.BackColor
..MaskColor = imgImages.MaskColor
End With
With imlaux.ListImages

For Each picImage In imgImages.ListImages
Call .Add(, picImage.Key, picImage.Picture)
Next picImage
where 'imlaux' is empty ImageList and 'imgImages' is primary ImageList
by design I should not use the new object ImageList of .NET
(System.Windows.Forms.ImageList)
Has someone any trick for me that could help with this problem? I am driven
to despair, thank you in advance

Jul 21 '05 #1
1 1779
Mac,

There is a VB56 -> to VBNet upgrade newsgroup. Not directly the best place
your place your questions in. It is very inactive at the moment. However a
great source of upgrading information.

I did a search on it for imagelist for you.
http://groups-beta.google.com/group/...rch+this+group

I hope this helps,

Cor
Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Christian Schmidbauer | last post: by
2 posts views Thread by Donald Firesmith | last post: by
34 posts views Thread by Mark Moore | last post: by
11 posts views Thread by Les Paul | last post: by
reply views Thread by vdex42 | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.