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

Reloading Image File at Compile

I have a form which contains a picturebox control which displays a gif
image. By default, the image that was selected when I designed the
dialog gets stored in the resx file and gets compiled and displayed.
How can I force the compiler to re-link to that gif file on the file
system at compile time so that I don't need to re-assign the gif file
every time a change is made to it?
thanks!

Nov 15 '05 #1
4 1925
You can make a tiny C# app that will modify your resx file and make it run
during Pre-build step.

-vJ

"Matthew Wieder" <De*********@SatoriGroupInc.com> wrote in message
news:uK**************@tk2msftngp13.phx.gbl...
I have a form which contains a picturebox control which displays a gif
image. By default, the image that was selected when I designed the
dialog gets stored in the resx file and gets compiled and displayed.
How can I force the compiler to re-link to that gif file on the file
system at compile time so that I don't need to re-assign the gif file
every time a change is made to it?
thanks!

Nov 15 '05 #2
Is there a way to have this functionality occur generically, or must I
wrote ode for every image in every dialog of every application? It
would seem to be useful functionality.
thanks!

Vijaye Raji wrote:
You can make a tiny C# app that will modify your resx file and make it run
during Pre-build step.

-vJ

"Matthew Wieder" <De*********@SatoriGroupInc.com> wrote in message
news:uK**************@tk2msftngp13.phx.gbl...
I have a form which contains a picturebox control which displays a gif
image. By default, the image that was selected when I designed the
dialog gets stored in the resx file and gets compiled and displayed.
How can I force the compiler to re-link to that gif file on the file
system at compile time so that I don't need to re-assign the gif file
every time a change is made to it?
thanks!



Nov 15 '05 #3
Another way to do this would be add your GIF image as an "Embedded resource"
and have the file added as a "link" to the original file, in your project.

This way, whenever the file changes, your compiler should pick up the latest
one available.

But if you have it as an embedded resource, you would have to retrieve the
image at run-time and use it appropriately. The designer can only pick
resources using the Resource Manager.

-vJ

"Matthew Wieder" <De*********@SatoriGroupInc.com> wrote in message
news:uF**************@TK2MSFTNGP12.phx.gbl...
Is there a way to have this functionality occur generically, or must I
wrote ode for every image in every dialog of every application? It
would seem to be useful functionality.
thanks!

Vijaye Raji wrote:
You can make a tiny C# app that will modify your resx file and make it run during Pre-build step.

-vJ

"Matthew Wieder" <De*********@SatoriGroupInc.com> wrote in message
news:uK**************@tk2msftngp13.phx.gbl...
I have a form which contains a picturebox control which displays a gif
image. By default, the image that was selected when I designed the
dialog gets stored in the resx file and gets compiled and displayed.
How can I force the compiler to re-link to that gif file on the file
system at compile time so that I don't need to re-assign the gif file
every time a change is made to it?
thanks!


Nov 15 '05 #4
Check out
Image myPicture = System.Drawing.Image.FromFile(@"picturename.gif");
Almost any graphic display method is overloaded to take an Image as a
picture parameter. I used it to load an ImageList directly from the
application directory. Works great.

Chuck
"Matthew Wieder" <De*********@SatoriGroupInc.com> wrote in message
news:uK****************@tk2msftngp13.phx.gbl...
I have a form which contains a picturebox control which displays a gif
image. By default, the image that was selected when I designed the
dialog gets stored in the resx file and gets compiled and displayed.
How can I force the compiler to re-link to that gif file on the file
system at compile time so that I don't need to re-assign the gif file
every time a change is made to it?
thanks!

Nov 15 '05 #5

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

Similar topics

2
by: DiggidyMack69 | last post by:
Hello folks I have a rolling image script that works fine except that the images do not seem to be preloading properly. The images are still being pulled on every interval from the server...
2
by: Ike | last post by:
Suppose I have two frames, as shown in the script below. One of the frames, I would like to have reload every ten minutes or so. Hower, the frame I wish to reload is a php script, which executes...
2
by: Charlie | last post by:
Hey all: I have a very simple script that changes an image when the user 'OnMouseOver's it. it works without a problem, but the progress bar at the bottom of the browser window reappears with...
3
by: src_mag | last post by:
Hello, I'd like to write JavaScript code that refreshes a frame once a second loading a different image each time. Basically, here's what the script would do: 0 sec load img0.gif 1 sec load...
10
by: John Smith | last post by:
I know that uploading an image to a database has been covered, oh, about 3 trillion times. However, I haven't found anything covering uploading to a MySQL database with .net. Please don't...
5
by: Mark Denardo | last post by:
I have a DLL that I created that contains a reference to an image file on my hard drive and when I go to use that DLL in another program it complains that it can't find it. (I'm using a relative...
2
by: Adam Teale | last post by:
hey guys Is there a builtin/standard install method in python for retrieving or finding out an image's dimensions? A quick google found me this:...
5
by: henryrhenryr | last post by:
Appologies for unclear title. I don't really understand the problem I'm facing. My system: PHP 5.2.1, Win2K, Apache 2, MySQL 5 (local - problem is same on my live site running php 4.3.9, Linux,...
2
by: sajankonni | last post by:
i want to refresh image buttons in asp.net,only without reloading the entire page.
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
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
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
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,...

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.