473,385 Members | 1,942 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,385 software developers and data experts.

Image list controls and image resources

Hi

I notice that in some cases, to get an icon, an object (for example a list
view) uses an image list, in others (e.g. a form) the image is selected from
the project resources, i.e. a file.

As I have images that I'd like to use in both situations I would like to use
the same method for each. Preferably, as I find importing images as
resources as often as not crashes VS, I would like to work with an image
list.

Anyone know if this is possible?

Thanks in advance

Mark
PS Sorry if I completely missed something obvious...
Sep 20 '06 #1
4 1574
Mark,

At least for me it is not clear what is the problem. Did you try it?

Cor

"Mark" <me@abc.comschreef in bericht
news:PZ******************@newsfe1-gui.ntli.net...
Hi

I notice that in some cases, to get an icon, an object (for example a list
view) uses an image list, in others (e.g. a form) the image is selected
from the project resources, i.e. a file.

As I have images that I'd like to use in both situations I would like to
use the same method for each. Preferably, as I find importing images as
resources as often as not crashes VS, I would like to work with an image
list.

Anyone know if this is possible?

Thanks in advance

Mark
PS Sorry if I completely missed something obvious...

Sep 21 '06 #2
Hi Cor

Sorry I was a little vague... Basically there are 2 problems:

1) I would like to contain all my icons in one image list that could be used
for form icons (i.e. the one that appears in the title bar), as well as list
and tree views etc. There appears to be no image list property for forms,
the icon property being a file reference.

2) When I import icons, as resources, to use as form icons VS crashes. On
restarting it is ok and the icon is available, but its a slow crash nd a
real time waster.

I have a database which the users can assign icons to specific record types.
I would like to use these icons both when the record is displayed in a
treeview (for example) and as the forms icon when the record is opened. I
would like both situations to use the same icon without having to keep an
image list and folder full of icon resources synchronised some how.

I hope this makes sense...?

Cheers (and thanks)

Mark

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:On*************@TK2MSFTNGP02.phx.gbl...
Mark,

At least for me it is not clear what is the problem. Did you try it?

Cor

"Mark" <me@abc.comschreef in bericht
news:PZ******************@newsfe1-gui.ntli.net...
>Hi

I notice that in some cases, to get an icon, an object (for example a
list view) uses an image list, in others (e.g. a form) the image is
selected from the project resources, i.e. a file.

As I have images that I'd like to use in both situations I would like to
use the same method for each. Preferably, as I find importing images as
resources as often as not crashes VS, I would like to work with an image
list.

Anyone know if this is possible?

Thanks in advance

Mark
PS Sorry if I completely missed something obvious...


Sep 22 '06 #3
Mark,

This is a question I have in my idea seen many times answered by Herfried,

Can you search for yourself in these newsgroups threads where that was in.
http://groups.google.com/group/micro...ons+imagelist&

I hope this helps,

Cor

"Mark" <me@abc.comschreef in bericht
news:aT******************@newsfe1-gui.ntli.net...
Hi Cor

Sorry I was a little vague... Basically there are 2 problems:

1) I would like to contain all my icons in one image list that could be
used for form icons (i.e. the one that appears in the title bar), as well
as list and tree views etc. There appears to be no image list property for
forms, the icon property being a file reference.

2) When I import icons, as resources, to use as form icons VS crashes. On
restarting it is ok and the icon is available, but its a slow crash nd a
real time waster.

I have a database which the users can assign icons to specific record
types. I would like to use these icons both when the record is displayed
in a treeview (for example) and as the forms icon when the record is
opened. I would like both situations to use the same icon without having
to keep an image list and folder full of icon resources synchronised some
how.

I hope this makes sense...?

Cheers (and thanks)

Mark

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:On*************@TK2MSFTNGP02.phx.gbl...
>Mark,

At least for me it is not clear what is the problem. Did you try it?

Cor

"Mark" <me@abc.comschreef in bericht
news:PZ******************@newsfe1-gui.ntli.net...
>>Hi

I notice that in some cases, to get an icon, an object (for example a
list view) uses an image list, in others (e.g. a form) the image is
selected from the project resources, i.e. a file.

As I have images that I'd like to use in both situations I would like to
use the same method for each. Preferably, as I find importing images as
resources as often as not crashes VS, I would like to work with an image
list.

Anyone know if this is possible?

Thanks in advance

Mark
PS Sorry if I completely missed something obvious...



Sep 23 '06 #4
Thanks again Cor (and also thanks to Herfried)

Managed to find the following (but haven't tried it yet)

Dim ico As Icon

Dim bmIcon As Bitmap = CType(ImageList1.Images(0), Bitmap)

ico = Icon.FromHandle(bmIcon.GetHicon)

Me.Icon = ico

Cheers

Mark

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:uB**************@TK2MSFTNGP03.phx.gbl...
Mark,

This is a question I have in my idea seen many times answered by Herfried,

Can you search for yourself in these newsgroups threads where that was in.
http://groups.google.com/group/micro...ons+imagelist&

I hope this helps,

Cor

"Mark" <me@abc.comschreef in bericht
news:aT******************@newsfe1-gui.ntli.net...
>Hi Cor

Sorry I was a little vague... Basically there are 2 problems:

1) I would like to contain all my icons in one image list that could be
used for form icons (i.e. the one that appears in the title bar), as well
as list and tree views etc. There appears to be no image list property
for forms, the icon property being a file reference.

2) When I import icons, as resources, to use as form icons VS crashes. On
restarting it is ok and the icon is available, but its a slow crash nd a
real time waster.

I have a database which the users can assign icons to specific record
types. I would like to use these icons both when the record is displayed
in a treeview (for example) and as the forms icon when the record is
opened. I would like both situations to use the same icon without having
to keep an image list and folder full of icon resources synchronised some
how.

I hope this makes sense...?

Cheers (and thanks)

Mark

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:On*************@TK2MSFTNGP02.phx.gbl...
>>Mark,

At least for me it is not clear what is the problem. Did you try it?

Cor

"Mark" <me@abc.comschreef in bericht
news:PZ******************@newsfe1-gui.ntli.net...
Hi

I notice that in some cases, to get an icon, an object (for example a
list view) uses an image list, in others (e.g. a form) the image is
selected from the project resources, i.e. a file.

As I have images that I'd like to use in both situations I would like
to use the same method for each. Preferably, as I find importing images
as resources as often as not crashes VS, I would like to work with an
image list.

Anyone know if this is possible?

Thanks in advance

Mark
PS Sorry if I completely missed something obvious...



Sep 23 '06 #5

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

Similar topics

3
by: tlviewer | last post by:
hello, The script below is a prototype for loading playing card images from the bitmap resource in cards.dll (WinXP) I like the idea of not keeping copies of the images as files. I'm able...
14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
3
by: Li Weng | last post by:
Hi, I have a form with a picturebox. I added an image in picturebox at design time. I create the form in codes with New and .Show() to pop up. But image doesn't show up. The picturebox looks...
3
by: Shailaja Kulkarni | last post by:
hi All, This problem is for C# windows application. I have a user control whcih contains one picture box along with other controls. Depending on certain conditions I want to change images on the...
1
by: Dan | last post by:
I must develop a (C-sharp) winforms application which should display some relatively large (e.g. 2~5 MB JPEG each) photographic images together with a rich set of related information: the...
1
by: Novice | last post by:
I'm afraid I will incur the wraith of Mr. Powell on this one - but I did read his #1 FAQ and some others and I still can't figure this out. I created this little c# app. and I have a PictureBox...
9
by: Hugh | last post by:
after I changed the image size. I tried different combinations of images sizes and button sizes. I have tried both botton and the image in the same sizes or button size was larger than that of...
0
by: Brian Henry | last post by:
Here is another virtual mode example for the .NET 2.0 framework while working with the list view. Since you can not access the items collection of the list view you need to do sorting another...
3
by: bbrewder | last post by:
I am interested in hearing how other people have handled sharing resources in multiple projects (for example, a save icon). We have a product that has many forms within many projects. Many of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...
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: 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
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,...
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...

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.