473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

How to convert code from VB to VB.NET ?

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
Nov 21 '05 #1
3 1648
"Dushyant" <Du******@discussions.microsoft.com> schrieb:
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.bm p"))
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2
Ben
I supposed you've already used migration wizard if not then you might want to
check it out. it helped me a lot.

"Dushyant" wrote:
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

Nov 21 '05 #3

"Dushyant" <Du******@discussions.microsoft.com> wrote in message
news:DE**********************************@microsof t.com...
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...
Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Eric Lilja | last post by:
Hello, I've made a templated class Option (a child of the abstract base class OptionBase) that stores an option name (in the form someoption=) and the value belonging to that option. The value is...
4
by: aevans1108 | last post by:
expanding this message to microsoft.public.dotnet.xml Greetings Please direct me to the right group if this is an inappropriate place to post this question. Thanks. I want to format a...
6
by: Ricardo Quintanilla | last post by:
i have a code that sends data to a socket listening over as400 platform, the socket responds to me as a "byte array". then i need to convert the "byte array" into a string. the problem is that...
5
by: simon | last post by:
I have datetime variable: Datetime tsEndTime; Should I use (DateTime): tsEndTime=(DateTime)rdr.GetValue(15) or is better to use: tsEndTime=Convert.ToDateTime(rdr.GetValue(15))
3
by: Thubaiti | last post by:
Hi, I have this code in my ASP.NET and I want to convert it to C# (code behind) <asp:Repeater id="subCategoryRepeater" runat="server"> <ItemTemplate> <ul> <li> <asp:HyperLink...
25
by: Charles Law | last post by:
I thought this was going to be straight forward, given the wealth of conversion functions in .NET, but it is proving more convoluted than imagined. Given the following <code> Dim ba(1) As...
7
by: patang | last post by:
I want to convert amount to words. Is there any funciton available? Example: $230.30 Two Hundred Thirty Dollars and 30/100
6
by: patang | last post by:
Could someone please tell me where am I supposed to put this code. Actually my project has two forms. I created a new module and have put the following code sent by someone. All the function...
3
by: mrajanikrishna | last post by:
Hi Friends, I am accepting a number from the user entered in a textbox. I want to assign to a variable in my code and assignt this to that variable. double num1 = (double)txtNum1.text; ...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.