Click here to Skip to main content
15,889,861 members
Home / Discussions / C#
   

C#

 
GeneralRe: Menue by Marc Clifton Pin
Frenchi1-Jun-03 5:12
Frenchi1-Jun-03 5:12 
Questionto byte[] conversion? Pin
stonee7431-May-03 3:38
stonee7431-May-03 3:38 
AnswerRe: to byte[] conversion? Pin
Eric Gunnerson (msft)31-May-03 16:34
Eric Gunnerson (msft)31-May-03 16:34 
GeneralRe: to byte[] conversion? Pin
stonee7431-May-03 17:01
stonee7431-May-03 17:01 
GeneralRe: to byte[] conversion? Pin
Eric Gunnerson (msft)1-Jun-03 7:05
Eric Gunnerson (msft)1-Jun-03 7:05 
GeneralRe: to byte[] conversion? Pin
stonee741-Jun-03 8:04
stonee741-Jun-03 8:04 
GeneralRe: to byte[] conversion? Pin
Eric Gunnerson (msft)3-Jun-03 9:43
Eric Gunnerson (msft)3-Jun-03 9:43 
GeneralResource Troubles (MissingManifestResourceException) Pin
gek_at31-May-03 2:02
gek_at31-May-03 2:02 
Hi,

I'm building an application where I'd like to put icons in resources. However as I don't use VS.net but the free IDE SharpDevelop, this is not quite so simple. I created a new resource file by the name SharpPrivacyMain.resource with the Resourcer and saved it in the same directory as SharpPrivacyMain.cs.

In SharpPrivacyMain.cs I added the followin code:

<br />
MessageBox.Show(String.Join("\n\r", Assembly.GetExecutingAssembly().GetManifestResourceNames()));<br />
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(SharpPrivacyMain)); <br />
this.bmpMnuClipboard = ((Bitmap)resources.GetObject("$this.menuClipboard"));<br />


I get only get to resources.GetObject, then a MissingResourceException is thrown. The messagebox shows me "SharpPrivacyMain.resources", so it seems that the resource was correctly compiled into the assembly. And the Bitmap $this.menuClipboard is also in the resource file. When I doubleclick it in the resource editor of SharpPrivacy, I can even see the image.

I don't know if the problem comes from the IDE, or if I just can't write working programs Smile | :) .

Any help would be really appretiated!

The exact Exception message is:

[thread 0xd04] Unhandled exception generated: (0x04a96490) <System.Resources.Mis
singManifestResourceException>
  _className=<null>
  _exceptionMethod=<null>
  _exceptionMethodString=<null>
  _message=(0x04a96508) "Could not find any resources appropriate for the specif
ied culture (or the neutral culture) in the given assembly.  Make sure "SharpPri
vacyMain.resources" was correctly embedded or linked into assembly "SharpPrivacy
".
baseName: SharpPrivacyMain  locationInfo: SharpPrivacy.SharpPrivacyMain  resourc
e file name: SharpPrivacyMain.resources  assembly: SharpPrivacy, Version=0.1.0.0
, Culture=neutral, PublicKeyToken=null"
  _innerException=<null>
  _helpURL=<null>
  _stackTrace=(0x04a9685c) array with dims=[96]
  _stackTraceString=<null>
  _remoteStackTraceString=<null>
  _remoteStackIndex=0x00000000
  _HResult=0x80131532
  _source=<null>
  _xptrs=0x00000000
  _xcode=0xe0434f4d


Thanks in Advance,
Daniel
GeneralRe: Resource Troubles (MissingManifestResourceException) Pin
gek_at31-May-03 2:18
gek_at31-May-03 2:18 
GeneralRe: Resource Troubles (MissingManifestResourceException) Pin
David Stone31-May-03 6:23
sitebuilderDavid Stone31-May-03 6:23 
QuestionIf C# is Microsoft's answer to SUN's Java, then is C# Platform independent? Pin
Link260030-May-03 23:56
Link260030-May-03 23:56 
AnswerRe: If C# is Microsoft's answer to SUN's Java, then is C# Platform independent? Pin
Kannan Kalyanaraman31-May-03 0:56
Kannan Kalyanaraman31-May-03 0:56 
AnswerRe: If C# is Microsoft's answer to SUN's Java, then is C# Platform independent? Pin
David Stone31-May-03 6:15
sitebuilderDavid Stone31-May-03 6:15 
AnswerRe: If C# is Microsoft's answer to SUN's Java, then is C# Platform independent? Pin
FruitBatInShades31-May-03 23:57
FruitBatInShades31-May-03 23:57 
GeneralRe: If C# is Microsoft's answer to SUN's Java, then is C# Platform independent? Pin
Link26001-Jun-03 6:09
Link26001-Jun-03 6:09 
QuestionHow do I draw graphics on the StatusBar ? Pin
JeffSayHi30-May-03 21:27
JeffSayHi30-May-03 21:27 
AnswerRe: How do I draw graphics on the StatusBar ? Pin
James T. Johnson31-May-03 18:16
James T. Johnson31-May-03 18:16 
AnswerRe: How do I draw graphics on the StatusBar ? Pin
Manster2-Jun-03 9:45
Manster2-Jun-03 9:45 
GeneralHello Pin
Hussein Zahran30-May-03 8:04
Hussein Zahran30-May-03 8:04 
GeneralRe: Hello Pin
Jon Newman30-May-03 8:41
Jon Newman30-May-03 8:41 
GeneralRe: Hello Pin
Paul Watson31-May-03 4:11
sitebuilderPaul Watson31-May-03 4:11 
Generalconst vs static readonly Fields Pin
Nathan Blomquist30-May-03 6:46
Nathan Blomquist30-May-03 6:46 
GeneralRe: const vs static readonly Fields Pin
Eric Gunnerson (msft)30-May-03 13:19
Eric Gunnerson (msft)30-May-03 13:19 
GeneralApplication &amp; Window positions Pin
BenjaminAlicea30-May-03 5:46
BenjaminAlicea30-May-03 5:46 
GeneralRe: Application &amp; Window positions Pin
KingTermite30-May-03 6:38
KingTermite30-May-03 6:38 

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.