473,434 Members | 1,484 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

Image.FromFile

Hi All,

I am trying to do a simple thing.
-----------------------------
Dim NCImage As System.Drawing.Image = System.Drawing.Image.FromFile("NC.jpg")
----------------------------
I have the image NC.jpg and its a valid image but the error i get is
FileNotFound. Can u plez tell me whats wrong?
Nov 19 '05 #1
8 4154
Is the image in the same directory with the dll for the assembly? That's
where you call is looking for it.

Eliyahu

"bsmalik" <bs*****@discussions.microsoft.com> wrote in message
news:A1**********************************@microsof t.com...
Hi All,

I am trying to do a simple thing.
-----------------------------
Dim NCImage As System.Drawing.Image = System.Drawing.Image.FromFile("NC.jpg") ----------------------------
I have the image NC.jpg and its a valid image but the error i get is
FileNotFound. Can u plez tell me whats wrong?

Nov 19 '05 #2
hello Eliyahu,

Thanks for ur reply. My image i.e. NC.jpg is in the same folder as my aspx
file. But still i get file not found.

please help.

thanks,
bsmalik

"Eliyahu Goldin" wrote:
Is the image in the same directory with the dll for the assembly? That's
where you call is looking for it.

Eliyahu

"bsmalik" <bs*****@discussions.microsoft.com> wrote in message
news:A1**********************************@microsof t.com...
Hi All,

I am trying to do a simple thing.
-----------------------------
Dim NCImage As System.Drawing.Image =

System.Drawing.Image.FromFile("NC.jpg")
----------------------------
I have the image NC.jpg and its a valid image but the error i get is
FileNotFound. Can u plez tell me whats wrong?


Nov 19 '05 #3
That's why you can't find it.The dll is in the bin directory. Either use
file path, or thing about another way of getting the image.

Eliyahu

"bsmalik" <bs*****@discussions.microsoft.com> wrote in message
news:57**********************************@microsof t.com...
hello Eliyahu,

Thanks for ur reply. My image i.e. NC.jpg is in the same folder as my aspx
file. But still i get file not found.

please help.

thanks,
bsmalik

"Eliyahu Goldin" wrote:
Is the image in the same directory with the dll for the assembly? That's
where you call is looking for it.

Eliyahu

"bsmalik" <bs*****@discussions.microsoft.com> wrote in message
news:A1**********************************@microsof t.com...
Hi All,

I am trying to do a simple thing.
-----------------------------
Dim NCImage As System.Drawing.Image =

System.Drawing.Image.FromFile("NC.jpg")
----------------------------
I have the image NC.jpg and its a valid image but the error i get is
FileNotFound. Can u plez tell me whats wrong?


Nov 19 '05 #4
hello Eliyahu,

I tried by moving the image to the bin folder and still does not work and i
really dono y. Do u have an msn or email id? Please help me.

Thanks.

"Eliyahu Goldin" wrote:
That's why you can't find it.The dll is in the bin directory. Either use
file path, or thing about another way of getting the image.

Eliyahu

"bsmalik" <bs*****@discussions.microsoft.com> wrote in message
news:57**********************************@microsof t.com...
hello Eliyahu,

Thanks for ur reply. My image i.e. NC.jpg is in the same folder as my aspx
file. But still i get file not found.

please help.

thanks,
bsmalik

"Eliyahu Goldin" wrote:
Is the image in the same directory with the dll for the assembly? That's
where you call is looking for it.

Eliyahu

"bsmalik" <bs*****@discussions.microsoft.com> wrote in message
news:A1**********************************@microsof t.com...
> Hi All,
>
> I am trying to do a simple thing.
> -----------------------------
> Dim NCImage As System.Drawing.Image =
System.Drawing.Image.FromFile("NC.jpg")
> ----------------------------
> I have the image NC.jpg and its a valid image but the error i get is
> FileNotFound. Can u plez tell me whats wrong?


Nov 19 '05 #5
try specifying the full path of the image like c:\inetpub\wwwroot\...

Eliyahu

"bsmalik" <bs*****@discussions.microsoft.com> wrote in message
news:1E**********************************@microsof t.com...
hello Eliyahu,

I tried by moving the image to the bin folder and still does not work and i really dono y. Do u have an msn or email id? Please help me.

Thanks.

"Eliyahu Goldin" wrote:
That's why you can't find it.The dll is in the bin directory. Either use
file path, or thing about another way of getting the image.

Eliyahu

"bsmalik" <bs*****@discussions.microsoft.com> wrote in message
news:57**********************************@microsof t.com...
hello Eliyahu,

Thanks for ur reply. My image i.e. NC.jpg is in the same folder as my aspx file. But still i get file not found.

please help.

thanks,
bsmalik

"Eliyahu Goldin" wrote:

> Is the image in the same directory with the dll for the assembly? That's > where you call is looking for it.
>
> Eliyahu
>
> "bsmalik" <bs*****@discussions.microsoft.com> wrote in message
> news:A1**********************************@microsof t.com...
> > Hi All,
> >
> > I am trying to do a simple thing.
> > -----------------------------
> > Dim NCImage As System.Drawing.Image =
> System.Drawing.Image.FromFile("NC.jpg")
> > ----------------------------
> > I have the image NC.jpg and its a valid image but the error i get is > > FileNotFound. Can u plez tell me whats wrong?
>
>
>


Nov 19 '05 #6
it does not work...The problem remains

"Eliyahu Goldin" wrote:
try specifying the full path of the image like c:\inetpub\wwwroot\...

Eliyahu

"bsmalik" <bs*****@discussions.microsoft.com> wrote in message
news:1E**********************************@microsof t.com...
hello Eliyahu,

I tried by moving the image to the bin folder and still does not work and

i
really dono y. Do u have an msn or email id? Please help me.

Thanks.

"Eliyahu Goldin" wrote:
That's why you can't find it.The dll is in the bin directory. Either use
file path, or thing about another way of getting the image.

Eliyahu

"bsmalik" <bs*****@discussions.microsoft.com> wrote in message
news:57**********************************@microsof t.com...
> hello Eliyahu,
>
> Thanks for ur reply. My image i.e. NC.jpg is in the same folder as my aspx > file. But still i get file not found.
>
> please help.
>
> thanks,
> bsmalik
>
> "Eliyahu Goldin" wrote:
>
> > Is the image in the same directory with the dll for the assembly? That's > > where you call is looking for it.
> >
> > Eliyahu
> >
> > "bsmalik" <bs*****@discussions.microsoft.com> wrote in message
> > news:A1**********************************@microsof t.com...
> > > Hi All,
> > >
> > > I am trying to do a simple thing.
> > > -----------------------------
> > > Dim NCImage As System.Drawing.Image =
> > System.Drawing.Image.FromFile("NC.jpg")
> > > ----------------------------
> > > I have the image NC.jpg and its a valid image but the error i get is > > > FileNotFound. Can u plez tell me whats wrong?
> >
> >
> >


Nov 19 '05 #7
Please help!!!

"bsmalik" wrote:
it does not work...The problem remains

"Eliyahu Goldin" wrote:
try specifying the full path of the image like c:\inetpub\wwwroot\...

Eliyahu

"bsmalik" <bs*****@discussions.microsoft.com> wrote in message
news:1E**********************************@microsof t.com...
hello Eliyahu,

I tried by moving the image to the bin folder and still does not work and

i
really dono y. Do u have an msn or email id? Please help me.

Thanks.

"Eliyahu Goldin" wrote:

> That's why you can't find it.The dll is in the bin directory. Either use
> file path, or thing about another way of getting the image.
>
> Eliyahu
>
> "bsmalik" <bs*****@discussions.microsoft.com> wrote in message
> news:57**********************************@microsof t.com...
> > hello Eliyahu,
> >
> > Thanks for ur reply. My image i.e. NC.jpg is in the same folder as my

aspx
> > file. But still i get file not found.
> >
> > please help.
> >
> > thanks,
> > bsmalik
> >
> > "Eliyahu Goldin" wrote:
> >
> > > Is the image in the same directory with the dll for the assembly?

That's
> > > where you call is looking for it.
> > >
> > > Eliyahu
> > >
> > > "bsmalik" <bs*****@discussions.microsoft.com> wrote in message
> > > news:A1**********************************@microsof t.com...
> > > > Hi All,
> > > >
> > > > I am trying to do a simple thing.
> > > > -----------------------------
> > > > Dim NCImage As System.Drawing.Image =
> > > System.Drawing.Image.FromFile("NC.jpg")
> > > > ----------------------------
> > > > I have the image NC.jpg and its a valid image but the error i get

is
> > > > FileNotFound. Can u plez tell me whats wrong?
> > >
> > >
> > >
>
>
>


Nov 19 '05 #8
Show us the code you have in place now, perhaps it will give us some
info...

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Wed, 29 Dec 2004 10:47:02 -0800, "bsmalik"
<bs*****@discussions.microsoft.com> wrote:
Please help!!!

"bsmalik" wrote:
it does not work...The problem remains

"Eliyahu Goldin" wrote:
> try specifying the full path of the image like c:\inetpub\wwwroot\...
>
> Eliyahu
>
> "bsmalik" <bs*****@discussions.microsoft.com> wrote in message
> news:1E**********************************@microsof t.com...
> > hello Eliyahu,
> >
> > I tried by moving the image to the bin folder and still does not work and
> i
> > really dono y. Do u have an msn or email id? Please help me.
> >
> > Thanks.
> >
> > "Eliyahu Goldin" wrote:
> >
> > > That's why you can't find it.The dll is in the bin directory. Either use
> > > file path, or thing about another way of getting the image.
> > >
> > > Eliyahu
> > >
> > > "bsmalik" <bs*****@discussions.microsoft.com> wrote in message
> > > news:57**********************************@microsof t.com...
> > > > hello Eliyahu,
> > > >
> > > > Thanks for ur reply. My image i.e. NC.jpg is in the same folder as my
> aspx
> > > > file. But still i get file not found.
> > > >
> > > > please help.
> > > >
> > > > thanks,
> > > > bsmalik
> > > >
> > > > "Eliyahu Goldin" wrote:
> > > >
> > > > > Is the image in the same directory with the dll for the assembly?
> That's
> > > > > where you call is looking for it.
> > > > >
> > > > > Eliyahu
> > > > >
> > > > > "bsmalik" <bs*****@discussions.microsoft.com> wrote in message
> > > > > news:A1**********************************@microsof t.com...
> > > > > > Hi All,
> > > > > >
> > > > > > I am trying to do a simple thing.
> > > > > > -----------------------------
> > > > > > Dim NCImage As System.Drawing.Image =
> > > > > System.Drawing.Image.FromFile("NC.jpg")
> > > > > > ----------------------------
> > > > > > I have the image NC.jpg and its a valid image but the error i get
> is
> > > > > > FileNotFound. Can u plez tell me whats wrong?
> > > > >
> > > > >
> > > > >
> > >
> > >
> > >
>
>
>


Nov 19 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: D. Yates | last post by:
Hi, I am looking for an example of how to extract bitmap images from an embedded resource file (a file with *.res extension, which can be viewed inside of the ide and can hold bitmaps, icons,...
5
by: Fabio | last post by:
private void Apri_Click(object sender, System.EventArgs e) { OpenFileDialog fileChooser=new OpenFileDialog(); //fileChooser.Filter="tiff images (*.tiff)|*.tiff"; DialogResult result =...
2
by: Robson Carvalho Machado | last post by:
Dear Friends, Does anybody knows how to use the below code with an image stored at SQL Image field? Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles...
2
by: steve | last post by:
imports system.drawing imports system.drawing.image dim img as image = image.fromfile("a.bmp") picturebox1.image = img i'm using vs 2003 and the error i have is that fromfile is not a member...
18
by: John | last post by:
Hi I am trying to display an image in a dialog using the following code; Dim frm As New frmImage Dim z As System.Drawing.Bitmap z.FromFile("c:\temp\image.gif") frm.picImage.Image = z...
15
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the...
4
by: escristian | last post by:
Hello. I'm trying to create an Image so I use something like this: Image newImage = Image.FromFile(filename); Now when it's a bmp file and certain .gif files it gives me an exception that...
5
by: Jerry J | last post by:
I want to use the System.Drawing.Image class. According to the help file, this is an abstract base class. Because it is supposedly abstract, I created another class that inherits from it. However,...
14
by: Steve K. | last post by:
I have a method that I use to get a System.Drawing.Image from a file without keeping a handle on the file open (so I can delete the file). Here is the code: <code> public static Image...
4
by: Marcolino | last post by:
Hi, I have simple needs but I don't know how to implement it. I have application that create Dynamic Button. I need to set the image on this button, getting the icon from a form. So pratically...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.