Click here to Skip to main content
15,900,108 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# & XML should take the blue pill ;-) Pin
J. Dunlap26-May-03 19:13
J. Dunlap26-May-03 19:13 
GeneralRe: C# & XML should take the blue pill ;-) Pin
antoine@orchus-tech27-May-03 4:10
antoine@orchus-tech27-May-03 4:10 
GeneralCode sample (+) Pin
Karavaev Denis27-May-03 0:49
Karavaev Denis27-May-03 0:49 
GeneralRe: C# & XML should take the blue pill ;-) Pin
Manster27-May-03 6:09
Manster27-May-03 6:09 
GeneralNewbie to C# :o) Pin
MemLeak26-May-03 8:53
MemLeak26-May-03 8:53 
GeneralRe: Newbie to C# :o) Pin
Daniel Strigl27-May-03 0:21
Daniel Strigl27-May-03 0:21 
GeneralImages on toolbar buttons Pin
monrobot1326-May-03 7:28
monrobot1326-May-03 7:28 
QuestionResources...Where do they go? Pin
monrobot1326-May-03 7:12
monrobot1326-May-03 7:12 
Hi all,

I'm trying to create a bitmap from a file on disk. I've added the file to my solution, but where does it go? I'm trying to create the bitmap like this:

Bitmap img = new Bitmap (GetType (), "img.bmp");
The problem is that I don't know what class I should be calling the GetType method on. I tried just using GetType, but the debugger tells me it can't find the resource in that class. Where does the resouce get added to?

As well, I tried just using the filename (it's in the same dir as my source files) to create the bitmap:

Bitmap img = new Bitmap ("img.bmp");
Doing this I get an ArgumentException with additional info that says "invalid parameter used". If I use the full path it works. Why does it say it's an invalid parameter when I just use the filename?

Thanks in advance.

- monrobot13
AnswerRe: Resources...Where do they go? Pin
James T. Johnson26-May-03 11:23
James T. Johnson26-May-03 11:23 
GeneralRe: small C application Pin
KingTermite26-May-03 4:19
KingTermite26-May-03 4:19 
GeneralWeb Services on localhost Pin
gadgetfbi26-May-03 2:58
gadgetfbi26-May-03 2:58 
GeneralRe: Web Services on localhost Pin
Rocky Moore26-May-03 5:08
Rocky Moore26-May-03 5:08 
GeneralSystem.Security File I/O problem Pin
Paul Griffin26-May-03 0:18
Paul Griffin26-May-03 0:18 
GeneralRe: System.Security File I/O problem Pin
apferreira26-May-03 0:31
apferreira26-May-03 0:31 
GeneralRe: System.Security File I/O problem Pin
Paul Griffin26-May-03 0:45
Paul Griffin26-May-03 0:45 
GeneralRe: System.Security File I/O problem Pin
apferreira26-May-03 1:02
apferreira26-May-03 1:02 
GeneralRe: System.Security File I/O problem Pin
Paul Griffin26-May-03 1:08
Paul Griffin26-May-03 1:08 
GeneralRe: System.Security File I/O problem Pin
Paul Griffin26-May-03 4:12
Paul Griffin26-May-03 4:12 
GeneralRe: System.Security File I/O problem Pin
Josh Martin27-May-03 13:52
Josh Martin27-May-03 13:52 
GeneralWorking on other application Pin
yarns25-May-03 21:27
yarns25-May-03 21:27 
GeneralRe: Working on other application Pin
apferreira26-May-03 0:20
apferreira26-May-03 0:20 
GeneralRe: Working on other application Pin
yarns26-May-03 0:42
yarns26-May-03 0:42 
GeneralRe: Working on other application Pin
apferreira26-May-03 1:07
apferreira26-May-03 1:07 
GeneralRe: Working on other application Pin
yarns26-May-03 19:56
yarns26-May-03 19:56 
GeneralRe: Working on other application Pin
Rocky Moore26-May-03 5:16
Rocky Moore26-May-03 5:16 

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.