Click here to Skip to main content
15,916,846 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to calculate the nearest color? Pin
DavidNohejl30-Sep-05 9:27
DavidNohejl30-Sep-05 9:27 
QuestionCSharpCodeProvider generated EXE embedded with ResourceWriter generated .resources fails... Pin
Jon Rista30-Sep-05 6:43
Jon Rista30-Sep-05 6:43 
AnswerRe: CSharpCodeProvider generated EXE embedded with ResourceWriter generated .resources fails... Pin
Jon Rista1-Oct-05 8:11
Jon Rista1-Oct-05 8:11 
QuestionConvert colour image to Black and White Pin
Colin Waite30-Sep-05 5:57
Colin Waite30-Sep-05 5:57 
AnswerRe: Convert colour image to Black and White Pin
Jon Rista30-Sep-05 7:11
Jon Rista30-Sep-05 7:11 
QuestionConvert a video from 32bit ->16bit in DirectShow -- possible? Pin
Nyst30-Sep-05 5:12
Nyst30-Sep-05 5:12 
QuestionRetrieve resource from resources.resx? Pin
Carl Mercier30-Sep-05 4:04
Carl Mercier30-Sep-05 4:04 
AnswerRe: Retrieve resource from resources.resx? Pin
Jon Rista30-Sep-05 7:23
Jon Rista30-Sep-05 7:23 
Well, there are two kinds of resources for a .NET project. There are manifest resources, and compiled resources. A manifest resource is something you would include in your project, like a .ico file, and mark as "Embedded Resource". That marks the resource as being directly embedded into the .NET programs manifest.

There are also resources that are compiled into a single resource file, and that file is then embedded into the .exe. Your <filename>.resx file, under your form, is not the actual resource file. If you have a form, Form1.cs, that form also has a Form1.resx file. All resources for the form are stored in the .resx file. When you compile your project, that resx file is converted into a .resources file (look in your .\obj\ folder to find it after compile). The final step in compilation is to link or embed a .resources file into the .exe. Its also possible to create other .resx files, each of which will be compiled and embedded into the .exe when you compile the project.

Manifest resources can be accessed using the code you posted, but resources from a .resx file are different. You can not access them directly from the assembly, and must use a ResourceManager to do the job. Check out the System.Resources namespace (I think its the same for .NET 2.0 as for 1.1), and learn how to use the ResourceManager, ResourceSet, and ResourceReader classes. Using those, you should be able to access the resources that were generated from your resources.resx file.
AnswerRe: Retrieve resource from resources.resx? Pin
Heinz_30-Sep-05 8:33
Heinz_30-Sep-05 8:33 
GeneralRe: Retrieve resource from resources.resx? Pin
Carl Mercier30-Sep-05 10:56
Carl Mercier30-Sep-05 10:56 
GeneralRe: Retrieve resource from resources.resx? Pin
Heinz_30-Sep-05 17:35
Heinz_30-Sep-05 17:35 
QuestionPage_Unload question Pin
Sled Dog30-Sep-05 3:50
Sled Dog30-Sep-05 3:50 
AnswerRe: Page_Unload question Pin
Tom Larsen30-Sep-05 4:35
Tom Larsen30-Sep-05 4:35 
GeneralRe: Page_Unload question Pin
Sled Dog30-Sep-05 4:56
Sled Dog30-Sep-05 4:56 
QuestionCrystalReport RAS Request Pin
User 209307330-Sep-05 2:26
User 209307330-Sep-05 2:26 
Questionfetching data from dataset using sql query Pin
arusmemon30-Sep-05 1:40
arusmemon30-Sep-05 1:40 
AnswerRe: fetching data from dataset using sql query Pin
Gavin Jeffrey30-Sep-05 2:07
Gavin Jeffrey30-Sep-05 2:07 
AnswerRe: fetching data from dataset using sql query Pin
Jon Rista30-Sep-05 7:36
Jon Rista30-Sep-05 7:36 
QuestionRotating images Pin
PHDENG8130-Sep-05 1:25
PHDENG8130-Sep-05 1:25 
AnswerRe: Rotating images Pin
Robert Rohde30-Sep-05 9:55
Robert Rohde30-Sep-05 9:55 
Questionhow to pass messages between java and .net without using sockets Pin
hasansheik30-Sep-05 1:03
hasansheik30-Sep-05 1:03 
AnswerRe: how to pass messages between java and .net without using sockets Pin
mohamad rafi30-Sep-05 3:01
sussmohamad rafi30-Sep-05 3:01 
AnswerRe: how to pass messages between java and .net without using sockets Pin
Daniel Grunwald30-Sep-05 3:32
Daniel Grunwald30-Sep-05 3:32 
AnswerRe: how to pass messages between java and .net without using sockets Pin
Jon Rista1-Oct-05 8:18
Jon Rista1-Oct-05 8:18 
QuestionAxAcroPDFLib???? Pin
Walt12330-Sep-05 0:20
Walt12330-Sep-05 0:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.