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

Help with a custom control using images

I'm trying to create a simple custom control that displays an animation composed of separate image files. However, I'm having trouble with how exactly I use the imported images with the control. When I try to add the custom control to my other project, an error message pops up telling me the file could not be found. I placed the images being used in the same directory in each project, yet I still get this error. Does anyone have an idea on how I could accomplish this? Thanks in advance.

Here's the code I'm trying to get working:

SkullControl(void)
{
InitializeComponent();

images->Add( Image::FromFile( String::Concat( "Images/skull1.gif" )));
images->Add( Image::FromFile( String::Concat( "Images/skull2.gif" )));

pictureBox1->Image = dynamic_cast< Image^ >(images->default[0]);
}

Then heres the timer event code:

private: System::Void timer1_Tick(System::Object^ sender, System::EventArgs^ e) {
count = (count + 1) % 2;
pictureBox1->Image = dynamic_cast< Image^ >( images->default[count] );
}

As you can see, it's just a very simple animation, but one of the requirements for this project is a custom control and I couldn't think of anything else to make using one. I just need to know how to implement those images so that they will work when the control is added to the other form. Does it have something to do with adding them to the resources or something?
May 20 '07 #1
1 1681
Please, I really need some help here, I've ran out of ideas on what to do with this.
May 20 '07 #2

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

Similar topics

5
by: Craig Keightley | last post by:
Please help, i have attached my page which worksin IE but i cannnot get the drop down menu to fucntion in firefox. Any one have any ideas why? Many Thanks Craig ...
0
by: Shailaja Kulkarni | last post by:
Hi All, I am new to component development. I want to create custom control to arrange contained controls in form of polygonal shape. The objects are placed in separate panel on the some form....
3
by: Angapparaj K via .NET 247 | last post by:
Hi, Iam trying to create a custom tree view control in thich i needto display images for some of the nodes. The images need on theright side of the nodes. Is there any way to do this...
2
by: BluDog | last post by:
Hi I have a created a custom web control called ImageBrowser, extract is below: <Code> #Region "Properties" Public Property Images() As ImageCollection
3
by: Dean Craig | last post by:
I'm working with the new ASP.NET AJAX Control Toolkit. I have a map that has several key areas (hot spots) where when the user hovers over them, I want to pop up a small window with information in...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
1
by: Amnu | last post by:
Hi there, I've been told to write a custom control using C#.NET ( 2.0 ). This control should be able to display images and give access to zoom functionality. I've visited numerous How-To pages...
3
by: AleXmanFree | last post by:
Hi , I have got problem with passing my inline based value to y user control (or custom control, no matter which one I use, I have tried both to make sure it doesnt matter) . So say I have...
1
by: AleXmanFree | last post by:
Hi , I have got problem with passing my inline based value to y user control (or custom control, no matter which one I use, I have tried both to make sure it doesnt matter) . So say I have...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...
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.