How to convert code from VB to VB.NET ?

G

Guest

Hello everyone,

I am working on converting one code from VB to VB.NET.
I am stuck at some point, please help me how to convert following code from
VB to VB.NET :
Dim xImage As System.Windows.Forms.ImageList
xImage = xImageLst.ListImages.Add(, "Open", LoadPicture(xPath &
File_File_Open))

Regards,
Dushyant
 
H

Herfried K. Wagner [MVP]

Dushyant said:
I am working on converting one code from VB to VB.NET.
I am stuck at some point, please help me how to convert following code
from
VB to VB.NET :
Dim xImage As System.Windows.Forms.ImageList
xImage = xImageLst.ListImages.Add(, "Open", LoadPicture(xPath &
File_File_Open))

\\\
Me.ImageList1.Images.Add(Image.FromFile("C:\foo.bmp"))
///
 
G

Guest

I supposed you've already used migration wizard if not then you might want to
check it out. it helped me a lot.
 
R

Rick Mogstad

Dushyant said:
Hello everyone,

I am working on converting one code from VB to VB.NET.
I am stuck at some point, please help me how to convert following code
from
VB to VB.NET :
Dim xImage As System.Windows.Forms.ImageList
xImage = xImageLst.ListImages.Add(, "Open", LoadPicture(xPath &
File_File_Open))

Regards,
Dushyant


I assume you are getting an "Object reference not set.." error?

You cant add images to a null object...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top