Scripting with VB.net

Hello,

I just started working with VB.net after downloading the Visual Studio Express package noted by Schmegie in an earlier thread here. I've spent the day tinkering with it and I have to say - It's been a long time since I used VB... :S and it seems to be completely different than Vbscript (which is the language of choice the last couple of years).

What I've been wanting to do is create a DeskShade-sque like program for Windows. I've been able to do it with VBscript but the results were less than consumer-friendly, hence the switch over to a language that offers a little more in the way of building an user interface.

Now to the dilemma: I've gotten all the images created for the program and the layout of the program is complete, the problem is I haven't had much luck populating a ListView with the jpegs of a folder; actually, I've had even less luck with parsing the images into an imagelist...and now I'm at a complete loss.

In Vbscript it was as simple as using a GetFiles() method and saving each image into an array but with VB.net...

I know there are some genius programmers here and would really appreciate if someone might be able to point me in the right direction.

Thankyou and I apologize for the length of this comment. :P

#353703

Create a class and inherit from ListBox, handle the MeasureItem and DrawItem events respectively.

To load an image from file...

Dim fs As New IO.FileStream(path)

Dim Img As Bitmap = Image.FromStream(fs)

fs.Close

GC.SupressFinalize(fs)

fs = Nothing

To add something to an array like in vbscript...

Dim arImages as New ArrayList

arImages.Add(Img)

#384901