Re: Image object in Net 2005
Peter Ritchie <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.cx |
|---|---|
| Message-ID | <LISTSERV%[email protected]> |
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