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

Changing picturebox with images inside *.resX file

Hi, using Managed C++ (.Net 2.0), I want to embed some images within an
executable using a .resX file, and upon an event (in this case a combo
box changing), I want the picture box to update with a different one.

I tried the following code:

System::ComponentModel::ComponentResourceManager^ resources =
(gcnew
System::ComponentModel::ComponentResourceManager(f ormDebayer::typeid));

pictureDebayer->Image =
(cli::safe_cast<System::Drawing::Image^>(resources->GetObject(comboDebayer->Text)));

The combobox contains the same names as the image names in the resX
file.

It works when I put the images into the form's resX file, but not when
I make a separate resX file with the images inside (in this case,
pictures.resX). I would keep it in the form's resX file, but whenever I
change a control in the form, the images disappear from the resX file.

If anyone could let me know the proper way to do this, I would really
appreciate it.

Thanks,
Steve

Oct 20 '06 #1
0 1626

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

Similar topics

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...
12
by: yaya via DotNetMonster.com | last post by:
Hi, I have a picture box with circles and rectangles, and I wana save all the images into a jpg file, i tried pictureBox1.Image.Save(@"c:\1.jpg"); but I got and error...
0
by: Severino | last post by:
Hi all, we have developed a .NET component for use inside Windows Forms: this component has been written using VC++.NET (2003) and is working perfectly when inserted inside VC#.NET or VB.NET...
0
by: Severino | last post by:
Hi all, we have developed a .NET component for use inside Windows Forms: this component has been written using VC++.NET (2003) and is working perfectly when inserted inside VC#.NET or VB.NET...
17
by: Jan Nielsen | last post by:
Hi I would like to databind a Picturebox to a SQL Server. I have a typed Dataset "DSBoernekirken1" It has a table named "tpersoner" with a column "Photo" I of course would like to bind the...
0
by: Rahul | last post by:
I have some resx files inside my Global Resources folder for the web and some other Resx files for the DataAccess layer project .For web project I am using Resx files for the Form control's...
4
by: TomA | last post by:
Hi All, I have a picturebox on a form containing the photo of a person. As you advance through the records, the photo updates. Rather than storing the images in an inefficient blob field in a...
4
by: Justin | last post by:
I created a panel. Then I created 4 picturebox's inside that panel. I added an image to each picturebox and I can see the images in my project. However when I run my project I don't see the...
13
DOSrelic
by: DOSrelic | last post by:
I have an assignment program that uses an array of images that are created from a supporting resource folder but I wish to incorporate them into the final exe file so how do I make an array from the...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
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...
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...

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.