473,657 Members | 2,595 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ImageList help in VB .NET - Display the Filename

24 New Member
I have made an imagelist and populated it with a few images where the filename of each of the files is important.

I can generate the random images in a PictureBox when I click a button. The code is:
Me.bxPics.Image = ImgLst.Images.I tem(i)

where i is a randomly generated number. Underneath the picture box is a text box where I would like the filename of the picture to be displayed. I don't understand how this is so hard to implement as in the imagelist properties, I can see the index of each picture as well as the FileName (or Name as it is displayed)

Is this possible?
Dec 18 '07 #1
2 2268
dspenca
1 New Member
Yep...

Had the same problem thsi morning simple answer just not very obvious.....

Me.LblPics.Text = ImgLst.Images.K eys.Item(i).ToS tring

you may not need the toString

Rgds!..
Dec 19 '07 #2
MattGaff
24 New Member
Cheers dude you are a legend.

Works a treat.
Dec 19 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1725
by: MB | last post by:
Hi a guys 02 questions a bout imageList please help me if you have an idea 1) I have a strange probleme with imageList, I added some images at designtime and I can see the images but at runtime MessageBox.Show(imageList.Images.Count.ToString()); display 0 and imageList.Images fails
4
48991
by: Ed Sutton | last post by:
I have been searching for how to get an icon resource and load it into an ImageList. I added an *.ico file to my project and set the files "Build Action" to "Embedded Resource". Is there any easy way to do this? This was easy to do in the old MFC. I can not find the answer in C#. I also need to embed an XML file into the resource and load it at run time. I am hoping once I figure out how to load an icon resource then loading an XML...
2
6669
by: Michael C | last post by:
One more quick question. I am creating a form that uses an ImageList control. I originally wanted to use a PictureBox control to display the images in the ImageList, but it doesn't seem possible. I found a work-around and used a Label to display, but I'm interested to know if the PictureBox can use an ImageList or not? It would seem to make sense... Thanks, Michael C.
2
2302
by: Bob C. | last post by:
Hi All, I am using the ImageList/ListView Components to display around 100 images in C#.NET. The issue i have is, some times i may need to display the thumbnail of size more then 256x256 in ImageList. But the ImageList Component supports only size upto 256x256. What is the best way to handle this?
7
2094
by: Andrew Christiansen | last post by:
Hey everyone. I have Visual Basic .NET 2003 and am trying to show images on a treeview control. I have the imagelist on the form filled with images, and have the ImageList property of the treeview control set to the imagelist containing the images I want to be displayed next to each node. It seems that no matter what I do there will be no images displayed next to the nodes during runtime. I tried creating nodes during designtime using...
0
2842
by: Andre Viens | last post by:
Hello, I am using the following variation of code from <http://support.microsoft.com/default.aspx?scid=kb;EN-US;319340> to add icons to an imagelist for use in a listview: Private Structure SHFILEINFO Public hIcon As IntPtr ' : icon Public iIcon As Integer ' : icondex Public dwAttributes As Integer ' : SFGAO_ flags
2
4854
by: senfo | last post by:
I'm using a ListView control to display pictures similarly to how Windows Explorer displays pictures in "Thumbnails" view. The images are stored in an ImageList component. I would like to provide the ability to rotate the images and I'm having some issues. Basically, what I've tried is: lstViewImages.LargeImageList.Images.RotateFlip(RotateFlipType.Rotate90FlipNone); lstViewImages.Update();
1
3583
by: =?Utf-8?B?VmFpYmhhdg==?= | last post by:
Hi.. Can anybody tell me how can iget the index of an image from an imagelist after suppling the icon file name.. Thanx in advance
1
1472
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
I am experimenting with a concept the engineers want. I want to create an app that runs in the console. When an event happens, I want to display an image. Can I do this without having a form? Right now, my app compiles, but crashes with an unhandled exception at this part: //
0
8823
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8730
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7321
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1950
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.