Can not display a load image in compact framework vb.net

  • Thread starter Thread starter Justin Champion
  • Start date Start date
J

Justin Champion

hello I am using the following code to display an image inside of an
emualtor

Dim myimage As Bitmap
myimage = New Bitmap("Sample.jpg")
PictureBox1.Image = CType(myimage, Image)

I have added the image file to the project so it is transferred and checked
that it is actually transferred. Every time I run the code I get a image
missing error ! Has nyone else had this error

Thanks,



Justin.

--
 
You need to specify a full path to the image:

Dim path =
System.IO.Path.GetDirectory(System.Reflection.Assembly.GetExecutingAssembly().GetModules(0).FullName)
+ "\Sample.jpg"
myimage = New Bitmap(path)
 
thank you I will try this out tommorrow.


Justin.

--
----------------------------------------------------------------------------
--------
"There's no point in being grown up if you can't be childish sometimes"
Fourth Doctor Who(Tom Baker)
Doctor Who Web Site www.doctorwho.hopto.org


Alex Feinman said:
You need to specify a full path to the image:

Dim path =
System.IO.Path.GetDirectory(System.Reflection.Assembly.GetExecutingAssembly(
).GetModules(0).FullName)
+ "\Sample.jpg"
myimage = New Bitmap(path)

--
Alex Feinman
---
Visit http://www.opennetcf.org
Justin Champion said:
hello I am using the following code to display an image inside of an
emualtor

Dim myimage As Bitmap
myimage = New Bitmap("Sample.jpg")
PictureBox1.Image = CType(myimage, Image)

I have added the image file to the project so it is transferred and
checked
that it is actually transferred. Every time I run the code I get a image
missing error ! Has nyone else had this error

Thanks,



Justin.
--
 
I am afriad that this did not work as a lot of the functionality is not
availble in .NET
Do you know what the file structure of .NET on a pocket PC is ?

--
----------------------------------------------------------------------------
--------
"There's no point in being grown up if you can't be childish sometimes"
Fourth Doctor Who(Tom Baker)
Doctor Who Web Site www.doctorwho.hopto.org


Alex Feinman said:
You need to specify a full path to the image:

Dim path =
System.IO.Path.GetDirectory(System.Reflection.Assembly.GetExecutingAssembly(
).GetModules(0).FullName)
+ "\Sample.jpg"
myimage = New Bitmap(path)

--
Alex Feinman
---
Visit http://www.opennetcf.org
Justin Champion said:
hello I am using the following code to display an image inside of an
emualtor

Dim myimage As Bitmap
myimage = New Bitmap("Sample.jpg")
PictureBox1.Image = CType(myimage, Image)

I have added the image file to the project so it is transferred and
checked
that it is actually transferred. Every time I run the code I get a image
missing error ! Has nyone else had this error

Thanks,



Justin.
--
I am afriad that this did not work as a lot of the functionality is not
availble in .NET
Do you know what the file structure of .NET on a pocket PC is ?

--
----------------------------------------------------------------------------
--------
"There's no point in being grown up if you can't be childish sometimes"
Fourth Doctor Who(Tom Baker)
Doctor Who Web Site www.doctorwho.hopto.org


Alex Feinman said:
You need to specify a full path to the image:

Dim path =
System.IO.Path.GetDirectory(System.Reflection.Assembly.GetExecutingAssembly(
).GetModules(0).FullName)
+ "\Sample.jpg"
myimage = New Bitmap(path)

--
Alex Feinman
---
Visit http://www.opennetcf.org
Justin Champion said:
hello I am using the following code to display an image inside of an
emualtor

Dim myimage As Bitmap
myimage = New Bitmap("Sample.jpg")
PictureBox1.Image = CType(myimage, Image)

I have added the image file to the project so it is transferred and
checked
that it is actually transferred. Every time I run the code I get a image
missing error ! Has nyone else had this error

Thanks,



Justin.
--
 
What did not work?
Perhaps it is because I typed FullName instead of FullyQualifeidName - but
I'm sure you caught a minor typo with the help of Intellisense

--
Alex Feinman
---
Visit http://www.opennetcf.org
Justin Champion said:
I am afriad that this did not work as a lot of the functionality is not
availble in .NET
Do you know what the file structure of .NET on a pocket PC is ?

--
----------------------------------------------------------------------------
--------
"There's no point in being grown up if you can't be childish sometimes"
Fourth Doctor Who(Tom Baker)
Doctor Who Web Site www.doctorwho.hopto.org


Alex Feinman said:
You need to specify a full path to the image:

Dim path =
System.IO.Path.GetDirectory(System.Reflection.Assembly.GetExecutingAssembly(
).GetModules(0).FullName)
+ "\Sample.jpg"
myimage = New Bitmap(path)

--
Alex Feinman
---
Visit http://www.opennetcf.org
Justin Champion said:
hello I am using the following code to display an image inside of an
emualtor

Dim myimage As Bitmap
myimage = New Bitmap("Sample.jpg")
PictureBox1.Image = CType(myimage, Image)

I have added the image file to the project so it is transferred and
checked
that it is actually transferred. Every time I run the code I get a
image
missing error ! Has nyone else had this error

Thanks,



Justin.
--
I am afriad that this did not work as a lot of the functionality is not
availble in .NET
Do you know what the file structure of .NET on a pocket PC is ?

--
----------------------------------------------------------------------------
--------
"There's no point in being grown up if you can't be childish sometimes"
Fourth Doctor Who(Tom Baker)
Doctor Who Web Site www.doctorwho.hopto.org


Alex Feinman said:
You need to specify a full path to the image:

Dim path =
System.IO.Path.GetDirectory(System.Reflection.Assembly.GetExecutingAssembly(
).GetModules(0).FullName)
+ "\Sample.jpg"
myimage = New Bitmap(path)

--
Alex Feinman
---
Visit http://www.opennetcf.org
Justin Champion said:
hello I am using the following code to display an image inside of an
emualtor

Dim myimage As Bitmap
myimage = New Bitmap("Sample.jpg")
PictureBox1.Image = CType(myimage, Image)

I have added the image file to the project so it is transferred and
checked
that it is actually transferred. Every time I run the code I get a
image
missing error ! Has nyone else had this error

Thanks,



Justin.
--
 
Back
Top