resources

How can I extract the original image stream from a System.Drawing.Bitmap object?

I am embedding images into my assembly using .resx files. Upon runtime, I need to save the images into standalone files, restoring the original content. How can I extract the original file stream from an System.Drawing.Bitmap instance? I know I can create a stream using Bitmap.Save(), but this transcodes (and in effect - inflates) the im...

Handling missing resources

I've just found myself in situation where I needed to handle exception I'll probably never get, so out of curiosity, let's do a small poll. Do you validate the presence of resources in your programs? I mean, those resources which are installed with your program, like icons, images and similar. Generally, if those are missing, either yo...

Run WPF Application from another assembly

I want to run my wpf application "A" from another assembly "B". I use the following code: static void main() { var app = new A.App(); app.InitializeComponent(); app.Run(); } when i run my app I got the following error: Cannot convert string '/Resources/icon.gif' in attribute 'Icon' to object of type 'System.Windows.Media.Imag...

xval get message from resource file

I'm working on a CMS system which uses a resource file to get information and errormessages from. The client side validation is working without problems, only it's not getting the errormessage from the resource file. While debugging i figured out xval seems to get the errormessages from a javascript file where the messages are set hard-c...

visual-studio-2008 versioninfo for all files updated from one place

The version information, displayed when the mouse cursor hovers over the file in windows explorer, is set for a file built by visual studio in the VERSION resource. I would like to set the version in one place for all the files built by a solution, preferably when I change the version in the install properties. Is there a way to do thi...

Using java with android how can I get the path of my resources files?

I added some audio files to the res file. first I created a raw dir and then I added the folder with the audio files. How can I get each file path? (I want to use the path to play this audio files) I found that I need to use classLoader.getResource but I don't understand how. what is the argument for this function? ...

Is it possible to store a resource in memcache?

I have not tried yet, as I would rather not spend time setting up memcached if this is not going to work... I am using Ruby. Is is possible to store a resource, such as an FTP connection, in memcache? ...

get resource from ASP.NET App_GlobalResources in separate DLL Library

I have a solution with one web project and one class library. In web project I have App_GlobalResources folder with resource file. In code used in web project I can access resourcel like this: string r = Resources.res.ResourceString123; How to get this resource string from class library? ...

pumpevents - customized look and feel java taking too much system resources

I make my own GUI see here but system is taking too much resources on further looking into the issue i have found that java pumpevents method is talking too much time. Any resolutions ???? pump events more detail pump event detail ...

Create a CBitmap from Resources ID

I need to fill a CImageList with a number of bitmaps which are stored in separate bmp files (rather than as a single bmp with numerous parts). I assume I need to create a CBitmap so I can call the Add method of CImageList. So how might one create a CBitmap object using only MFC Resource IDs? ...

Visual Studio 2010 localization resource files, how to add in strings automatically?

I have a certain project that has a resource directory with a .resx for each language supported in the product. Right now I am adding these strings by hand using the visual studio 2010 IDE, but because there are a large number of strings, this manual management of these resources can get tricky, and something can easily get omitted in ...

Release resources in .Net C#

Hi, I'm new to C# and .NET, ,and have been reading around about it. I need to know why and when do I need to release resources? Doesn't the garbage collector take care of everything? When do I need to implement IDisposable, and how is it different from destructor in C++? Also, if my program is rather small i.e. a screensaver, do I nee...

Junit run not picking file src/test/resources. For file required by some dependency jar

Hi, I m facing a issue where test/resource is not picked,but instead jar's main/resource is picked Scenario is like : Myproject src/test/resources--- have config.xml w which should be needed by abc.jar which is a dependecy in Myproject. When running test case for Myproject its loading config.xml of abc.jar instead of Myproject test/res...

How do you keep track of what the industry is up to?

A discussion elsewhere made me realize that I don't do a particularly good job of following the software industry. My exposure to new trends or technologies is haphazard at best, often limited to a "Hey, that sounds interesting" when I see people discussing something I'm not familiar with on SO. To abuse a metaphor, I'm quite familiar ...

Read Resources from a dll

Hi, I've two VB 2008 projects - one is class library project and another is winform project. In class library project, I've defined some strings in the project resources (project properties > Resources tab). I build that class library project and get the dll from debug folder and added up as a reference in my winforms project. Now, I...

Why does this PNG file look so poorly when embedded as a resource in a Qt project?

Here is the PNG file and what it looks like in a QWebView when accessed via http://sstatic.net/so/img/logo.png: When accessed via HTTP: <img src="http://sstatic.net/so/img/logo.png" width='250' height='61' /> When accessed via a resource: <img src="qrc:/images/logo.png" width='250' height='61' /> As you can see, the only modific...

Setting application info in Qt

Anyone have an tips on setting the application info (ie. right click on .exe->properties) from Qt? I can add arbitrary version strings to Qt resource file (qrc) and display them. But most Windows installers check the version number and I can't find a Qt way of setting these fields other than manually maintaining a separate .RC file So...

How can I get Resources by name (string) and not by integer

for example: public final class R { public static final class raw { public static final int yuri=0x7f040000; } } How can I get the resource by its name? Without using R.raw.yuri = (int) ...

How to add a control to a resource file in C# for localizing a winform application.

I want to add culture to window application so that it can be used globally. For this I want to use Only one Resource File. Right now what I do is adds control manually to that file and reads them at page load. I want this thing to become automated. How should I proceed ...

Change default properties for .resx files created with Visual Studio 2010

When creating a new .resx file anywhere in my solution, I would like the following properties to be other than the default: Copy to Output Directory: Copy if newer Custom Tool namespace: Booking.Resources Access Modifier: public Is there any way I can change the default Visual Studio behavior on creation of these files, so I don't ha...