Re: Image object in Net 2005

Peter Osucha <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.cx
Message-ID <[email protected]>
Thank you for that very useful tip, Peter.  I'll look through the MSDN
sections on using resources.

Sincerely,
Peter

> -----Original Message-----
> From: Discussion relating to the specifics of the C# and
> Managed C++ languages [mailto:[email protected]]
> On Behalf Of Peter Ritchie
> Sent: Wednesday, September 06, 2006 11:48 AM
> To: [email protected]
> Subject: Re: [DOTNET-CX] Image object in Net 2005
>
> If you have a bitmap in your project, I suggest putting it in
> the resources.  With Visual Studio 2005, you can access your
> resources through
> global::ApplicationNamespace.Properties.Resources.  If you
> add an bitmap to your resources and name it "Image1" you
> would then access it through
> "global::ApplicationNamespace.Properties.Resources.Image1".
>
> Putting images in resources means you don't have to deal with
> the local file system, permissions, etc.
>
> On Wed, 6 Sep 2006 11:34:14 -0400, Peter Osucha
> <[email protected]> wrote:
>
> >Two questions concerning this...
> >
> >1.  If I have some bitmap files in my project and I want to create
> >Image
> >(BitMap) objects from them, is there an easier way to do so then by
> >using the Image.FromFile() method?
> >
> >2. Under what heading can I find info on paths (fixed,
> relative, UNC,
> >what prefixing with '@', etc.) in filenames in C# (If I have a file
> >(perhaps a text file or a resource file like a bitmap) saved in my
> >project directory
> or
> >a subdirectory thereof, Application.StartupPath gets close but some
> >work still needs to be done)?

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.