473,837 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 10804

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

// where image# is an image object variable
"Maheshkuma r.R" <cy**********@y ahoo.com> wrote in message news:uW******** ******@TK2MSFTN GP12.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
"Maheshkuma r.R" <cy**********@y ahoo.com> wrote in message news:uW******** ******@TK2MSFTN GP12.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,

........functio n (string[] fname)

{

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

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

Bitmap bmp= new Bitmap(Clipboar d.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******** ******@TK2MSFTN GP12.phx.gbl...

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

// where image# is an image object variable
"Maheshkuma r.R" <cy**********@y ahoo.com> wrote in message news:uW******** ******@TK2MSFTN GP12.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,

........functio n (string[] fname)

{

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

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

Bitmap bmp= new Bitmap(Clipboar d.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******** ******@TK2MSFTN GP12.phx.gbl...

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

// where image# is an image object variable
"Maheshkuma r.R" <cy**********@y ahoo.com> wrote in message news:uW******** ******@TK2MSFTN GP12.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

"Maheshkuma r.R" <cy**********@y ahoo.com> wrote in message news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Thnkz Bass, again i struck in adding images to listview controls,

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

{

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

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

Bitmap bmp= new Bitmap(Clipboar d.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(b mp, fname[i]));

////

class BitmapNameMap {

public BitmapNameMap(B itmap 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

"Maheshkuma r.R" <cy**********@y ahoo.com> wrote in message news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Thnkz Bass, again i struck in adding images to listview controls,

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

{

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

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

Bitmap bmp= new Bitmap(Clipboar d.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(b mp, fname[i]));

////

class BitmapNameMap {

public BitmapNameMap(B itmap 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
1673
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 works fine with text in those spaces. Direct links to the pages online: http://www.lajzar.co.uk/en/colours.html http://www.lajzar.co.uk/en/animals.html How can I fix this so the functions work with images in that array? It
4
1815
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 an access database. I already publish info from the database to an asp page, but i would like to preload the images. I open the database successfully like this ---------------
4
1707
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, and with a single call in the html, randomly inserts a graphic (which is linked to another page, as defined in the second array). The working example is http://seven.postmodern.com/insight/tarot/1cardreading.html What I would like to do is...
12
2544
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
3507
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 in a hidden field) I wish the user to be able to edit the data in the table, so I have extracted the records into hiddenfield, textareas, dropdown list and checkbox so that they can make changes. I named these elements as arrays and wish to run an...
14
4209
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 Sub DefaultImage() It should be array For i = 1 To 6
2
997
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 everything to work, but my problem is when the next and previous are clicked ALL pictures are shown. What I would like is when the first set of thumbnails comes up, the big picture will only scroll through the first set of large pictures...etc... I...
1
2232
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 up or randomly? I need to know so in turn I can realize what the coordinates are of the sub-images. Here is a snippet of the code that is performing this task... for (int a = 1; a < 4800; a++) //will create 4800 sub images if a goes to...
1
2009
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, i have an XML with photos , at the moment are 7 photos in there. The code i have at the moment just simply reads from the xml all the photos adn display them in a movie clip . This is the code so far : step_sel_img.onRelease=function(){...
15
2502
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 outside .dll. Though I can't figure out if I want to use the Resources feature with C# rather then the "Direct" calling if you will. I have, in many Learning projects in the past have just used the direct call "C:\\Image.jpg" with success, even...
0
9682
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10875
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
10566
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
10623
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
10272
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
9401
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
5669
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5848
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4474
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

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.