473,408 Members | 2,888 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,408 software developers and data experts.

images in arrays..

How i can store images in array @ runtime..? What are the possbile ways..

Thankz..
-
Mähésh Kumär. R

Nov 17 '05 #1
6 10769

ArrayList myImages = new ArrayList();
myImages.Add ( image1 );
myImages.Add ( image2 );
myImages.Add ( image3 );

// where image# is an image object variable
"Maheshkumar.R" <cy**********@yahoo.com> wrote in message news:uW**************@TK2MSFTNGP12.phx.gbl...
How i can store images in array @ runtime..? What are the possbile ways..

Thankz..
-
Mähésh Kumär. R

Nov 17 '05 #2

ArrayList myImages = new ArrayList();
myImages.Add ( image1 );
myImages.Add ( image2 );
myImages.Add ( image3 );

// where image# is an image object variable
"Maheshkumar.R" <cy**********@yahoo.com> wrote in message news:uW**************@TK2MSFTNGP12.phx.gbl...
How i can store images in array @ runtime..? What are the possbile ways..

Thankz..
-
Mähésh Kumär. R

Nov 17 '05 #3
Thnkz Bass, again i struck in adding images to listview controls,

........function (string[] fname)

{

mycontrol.filename = fname[i].ToString(); // image filename assigned to my control

a = mycontrol.copyImage2Clipboard; // and also taking first frame of that image for thumbnail generation

Bitmap bmp= new Bitmap(Clipboard.GetImage());

listView2.Items.Add(fname[i]); // Here i'm adding filenames to the list control, but i want to add image to the list control..how can i do this ..please guide

...

..

..}

..

How can i add an image to the list view control in this scenario..?

Maheshkumar.R

"Dan Bass" <Not Listed> wrote in message news:uK**************@TK2MSFTNGP12.phx.gbl...

ArrayList myImages = new ArrayList();
myImages.Add ( image1 );
myImages.Add ( image2 );
myImages.Add ( image3 );

// where image# is an image object variable
"Maheshkumar.R" <cy**********@yahoo.com> wrote in message news:uW**************@TK2MSFTNGP12.phx.gbl...
How i can store images in array @ runtime..? What are the possbile ways..

Thankz..
-
Mähésh Kumär. R

Nov 17 '05 #4
Thnkz Bass, again i struck in adding images to listview controls,

........function (string[] fname)

{

mycontrol.filename = fname[i].ToString(); // image filename assigned to my control

a = mycontrol.copyImage2Clipboard; // and also taking first frame of that image for thumbnail generation

Bitmap bmp= new Bitmap(Clipboard.GetImage());

listView2.Items.Add(fname[i]); // Here i'm adding filenames to the list control, but i want to add image to the list control..how can i do this ..please guide

...

..

..}

..

How can i add an image to the list view control in this scenario..?

Maheshkumar.R

"Dan Bass" <Not Listed> wrote in message news:uK**************@TK2MSFTNGP12.phx.gbl...

ArrayList myImages = new ArrayList();
myImages.Add ( image1 );
myImages.Add ( image2 );
myImages.Add ( image3 );

// where image# is an image object variable
"Maheshkumar.R" <cy**********@yahoo.com> wrote in message news:uW**************@TK2MSFTNGP12.phx.gbl...
How i can store images in array @ runtime..? What are the possbile ways..

Thankz..
-
Mähésh Kumär. R

Nov 17 '05 #5

"Maheshkumar.R" <cy**********@yahoo.com> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...
Thnkz Bass, again i struck in adding images to listview controls,

.......function (string[] fname)

{

mycontrol.filename = fname[i].ToString(); // image filename assigned to my control

a = mycontrol.copyImage2Clipboard; // and also taking first frame of that image for thumbnail generation

Bitmap bmp= new Bitmap(Clipboard.GetImage());

listView2.Items.Add(fname[i]); // Here i'm adding filenames to the list control, but i want to add image to the list control..how can i do this ..please guide

Make a class which will map bitmap with its name, and override ToString() method:

listView2.Items.Add(new BitmapNameMap(bmp, fname[i]));

////

class BitmapNameMap {

public BitmapNameMap(Bitmap bmp, string name) {

m_bmp = bmp;m_mane = name;

}

public override ToString() { return m_name; }

public Bitmap Bitmap {

get { return m_bmp; }

}

}

Nov 17 '05 #6

"Maheshkumar.R" <cy**********@yahoo.com> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...
Thnkz Bass, again i struck in adding images to listview controls,

.......function (string[] fname)

{

mycontrol.filename = fname[i].ToString(); // image filename assigned to my control

a = mycontrol.copyImage2Clipboard; // and also taking first frame of that image for thumbnail generation

Bitmap bmp= new Bitmap(Clipboard.GetImage());

listView2.Items.Add(fname[i]); // Here i'm adding filenames to the list control, but i want to add image to the list control..how can i do this ..please guide

Make a class which will map bitmap with its name, and override ToString() method:

listView2.Items.Add(new BitmapNameMap(bmp, fname[i]));

////

class BitmapNameMap {

public BitmapNameMap(Bitmap bmp, string name) {

m_bmp = bmp;m_mane = name;

}

public override ToString() { return m_name; }

public Bitmap Bitmap {

get { return m_bmp; }

}

}

Nov 17 '05 #7

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

Similar topics

2
by: Fabian | last post by:
This javascript is meant for learning language vocabulary, specifically colours on this example. However, when I use images in the mtWord array, it breaks when checking for correct answers. It...
4
by: Stuart | last post by:
Hi there, I am trying to populate the array "yourImages" in the following code, http://www.javascriptkit.com/script/script2/preloadimage2.shtml except i am trying to fill it with the values from...
4
by: seven | last post by:
This might be a newbie question or otherwise easy stuff for some of you, but it's tweaking me ... can't seem to get it to work right. I am working with a script that basically creates two arrays,...
12
by: Duderonomoy | last post by:
Hello, I am querying the JavaScript community to learn if others are having problems with Safari and JavaScript arrays: myImages = ; then referenced like this:
16
by: Ian Davies | last post by:
Hello Needing help with a suitable solution. I have extracted records into a table under three columns 'category', 'comment' and share (the category column also holds the index no of the record...
14
lotus18
by: lotus18 | last post by:
Hello World I'm back again. LOL How to make an image arrays? I have 6 images named Button (Index from 1-6). I'm working on MouseMove events these images. So far I have these codes: Public...
2
by: rainclair | last post by:
Hello, I am trying to get 4 sets of thumbnails (each set in a hidden div tag) to onClick show in a main picture box. The links to the hidden divs are just below the main picture box. I can get...
1
by: Stephen.Schoenberger | last post by:
I am working with some images as byte arrays and am not sure nor can I figure out if as I am reading the image and saving smaller sub- images I am reading across and down the image or down and back...
1
by: onyris | last post by:
Hi guys , I have got lost a bit with this flash i am doing at moment , i will try to explain the best i can and i'll post the code as well so u can see what i've done . I am using Action script 2,...
15
Samishii23
by: Samishii23 | last post by:
First, images... I have a project that, at this time and version I am working with, I have 648 main stay images, so to say, plus another 100 or so in side features. They are going to stored in a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.