Hi,
I'm using Visual Basic 2005 and programming for a TyTanII handheld.
On the storage card I have a series of pictures(maps) in a folder named P19.
I want to change the picture in a picturebox. I can do it OK in VB for the
desktop but and am completely lost when it comes to doing it for the pocketPC.
I have searched around but can't find anything to help or guide me. I fear I
am missing something simple. Can someone supply me with some sample code?
Perhaps even what imports I need? I'm only a hobbyist (obsessive my partner
says)programmer and this has me stumped.
Paul C

Re: Mobile 6 + changing pictures by ctacke/>

ctacke/>
Tue Mar 04 21:07:26 CST 2008

If MyPictureBox.Picture != Nothing Then MyPictureBox.Picture.Dispose()
MyPictureBox.Picture = new Bitmap(@"\Storage Card\P19\MyImage1.jpg")


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com



"Paul C." <Paul C.@discussions.microsoft.com> wrote in message
news:24E816ED-1BEF-41CA-927B-D235C632C425@microsoft.com...
> Hi,
> I'm using Visual Basic 2005 and programming for a TyTanII handheld.
> On the storage card I have a series of pictures(maps) in a folder named
> P19.
> I want to change the picture in a picturebox. I can do it OK in VB for the
> desktop but and am completely lost when it comes to doing it for the
> pocketPC.
> I have searched around but can't find anything to help or guide me. I fear
> I
> am missing something simple. Can someone supply me with some sample code?
> Perhaps even what imports I need? I'm only a hobbyist (obsessive my
> partner
> says)programmer and this has me stumped.
> Paul C
>
>
>



Re: Mobile 6 + changing pictures by PaulC

PaulC
Tue Mar 04 22:06:00 CST 2008

Thanks,
I see how I get on with that.
Paul C

"<ctacke/>" wrote:

> If MyPictureBox.Picture != Nothing Then MyPictureBox.Picture.Dispose()
> MyPictureBox.Picture = new Bitmap(@"\Storage Card\P19\MyImage1.jpg")
>
>
> --
>
> Chris Tacke, Embedded MVP
> OpenNETCF Consulting
> Giving back to the embedded community
> http://community.OpenNETCF.com
>
>
>
> "Paul C." <Paul C.@discussions.microsoft.com> wrote in message
> news:24E816ED-1BEF-41CA-927B-D235C632C425@microsoft.com...
> > Hi,
> > I'm using Visual Basic 2005 and programming for a TyTanII handheld.
> > On the storage card I have a series of pictures(maps) in a folder named
> > P19.
> > I want to change the picture in a picturebox. I can do it OK in VB for the
> > desktop but and am completely lost when it comes to doing it for the
> > pocketPC.
> > I have searched around but can't find anything to help or guide me. I fear
> > I
> > am missing something simple. Can someone supply me with some sample code?
> > Perhaps even what imports I need? I'm only a hobbyist (obsessive my
> > partner
> > says)programmer and this has me stumped.
> > Paul C
> >
> >
> >
>
>
>

Re: Mobile 6 + changing pictures by PaulC

PaulC
Wed Mar 05 01:10:01 CST 2008

Not quite sure what line 1 does - disposes of the picture box if empty I
assume.
The second line - I don't seem to have the picture option, only image. That
doesn't seem to work though.
I'm persevering and will see what I can do but Is there some literature on
these procedures? I really am a greenie on this although I have been throwing
pictures around in various programmes since VB3. Mobile 6 is a whole new
ballgame.

"<ctacke/>" wrote:

> If MyPictureBox.Picture != Nothing Then MyPictureBox.Picture.Dispose()
> MyPictureBox.Picture = new Bitmap(@"\Storage Card\P19\MyImage1.jpg")
>
>
> --
>
> Chris Tacke, Embedded MVP
> OpenNETCF Consulting
> Giving back to the embedded community
> http://community.OpenNETCF.com
>
>
>
> "Paul C." <Paul C.@discussions.microsoft.com> wrote in message
> news:24E816ED-1BEF-41CA-927B-D235C632C425@microsoft.com...
> > Hi,
> > I'm using Visual Basic 2005 and programming for a TyTanII handheld.
> > On the storage card I have a series of pictures(maps) in a folder named
> > P19.
> > I want to change the picture in a picturebox. I can do it OK in VB for the
> > desktop but and am completely lost when it comes to doing it for the
> > pocketPC.
> > I have searched around but can't find anything to help or guide me. I fear
> > I
> > am missing something simple. Can someone supply me with some sample code?
> > Perhaps even what imports I need? I'm only a hobbyist (obsessive my
> > partner
> > says)programmer and this has me stumped.
> > Paul C
> >
> >
> >
>
>
>

Re: Mobile 6 + changing pictures by ctacke/>

ctacke/>
Wed Mar 05 07:47:15 CST 2008

It was off the top of my head - use the Image property. What does "doesn't
work" mean? What does it do?

The dispose is necessary if you're cycling the pictures. It doesn't dispose
the picturebox, it disposes the image in it. Huge diffrence.

There's plenty of documentation. Help in Studio - MSDN online.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com


"Paul C." <PaulC@discussions.microsoft.com> wrote in message
news:9D50CBEE-7938-4099-8115-CEE7559966C3@microsoft.com...
> Not quite sure what line 1 does - disposes of the picture box if empty I
> assume.
> The second line - I don't seem to have the picture option, only image.
> That
> doesn't seem to work though.
> I'm persevering and will see what I can do but Is there some literature on
> these procedures? I really am a greenie on this although I have been
> throwing
> pictures around in various programmes since VB3. Mobile 6 is a whole new
> ballgame.
>
> "<ctacke/>" wrote:
>
>> If MyPictureBox.Picture != Nothing Then MyPictureBox.Picture.Dispose()
>> MyPictureBox.Picture = new Bitmap(@"\Storage Card\P19\MyImage1.jpg")
>>
>>
>> --
>>
>> Chris Tacke, Embedded MVP
>> OpenNETCF Consulting
>> Giving back to the embedded community
>> http://community.OpenNETCF.com
>>
>>
>>
>> "Paul C." <Paul C.@discussions.microsoft.com> wrote in message
>> news:24E816ED-1BEF-41CA-927B-D235C632C425@microsoft.com...
>> > Hi,
>> > I'm using Visual Basic 2005 and programming for a TyTanII handheld.
>> > On the storage card I have a series of pictures(maps) in a folder named
>> > P19.
>> > I want to change the picture in a picturebox. I can do it OK in VB for
>> > the
>> > desktop but and am completely lost when it comes to doing it for the
>> > pocketPC.
>> > I have searched around but can't find anything to help or guide me. I
>> > fear
>> > I
>> > am missing something simple. Can someone supply me with some sample
>> > code?
>> > Perhaps even what imports I need? I'm only a hobbyist (obsessive my
>> > partner
>> > says)programmer and this has me stumped.
>> > Paul C
>> >
>> >
>> >
>>
>>
>>



Re: Mobile 6 + changing pictures by PaulC

PaulC
Wed Mar 05 14:21:10 CST 2008


Thanks Chris,
I think I am at last getting somewhere. It wasn't working for some reason &
there seemed to be a superfluous "@" in the code. I really appreciate your
help and will soldier on: trial and error seems to be my modus operandi.


"<ctacke/>" wrote:

> It was off the top of my head - use the Image property. What does "doesn't
> work" mean? What does it do?
>
> The dispose is necessary if you're cycling the pictures. It doesn't dispose
> the picturebox, it disposes the image in it. Huge diffrence.
>
> There's plenty of documentation. Help in Studio - MSDN online.
>
>
> --
>
> Chris Tacke, Embedded MVP
> OpenNETCF Consulting
> Giving back to the embedded community
> http://community.OpenNETCF.com
>
>
> "Paul C." <PaulC@discussions.microsoft.com> wrote in message
> news:9D50CBEE-7938-4099-8115-CEE7559966C3@microsoft.com...
> > Not quite sure what line 1 does - disposes of the picture box if empty I
> > assume.
> > The second line - I don't seem to have the picture option, only image.
> > That
> > doesn't seem to work though.
> > I'm persevering and will see what I can do but Is there some literature on
> > these procedures? I really am a greenie on this although I have been
> > throwing
> > pictures around in various programmes since VB3. Mobile 6 is a whole new
> > ballgame.
> >
> > "<ctacke/>" wrote:
> >
> >> If MyPictureBox.Picture != Nothing Then MyPictureBox.Picture.Dispose()
> >> MyPictureBox.Picture = new Bitmap(@"\Storage Card\P19\MyImage1.jpg")
> >>
> >>
> >> --
> >>
> >> Chris Tacke, Embedded MVP
> >> OpenNETCF Consulting
> >> Giving back to the embedded community
> >> http://community.OpenNETCF.com
> >>
> >>
> >>
> >> "Paul C." <Paul C.@discussions.microsoft.com> wrote in message
> >> news:24E816ED-1BEF-41CA-927B-D235C632C425@microsoft.com...
> >> > Hi,
> >> > I'm using Visual Basic 2005 and programming for a TyTanII handheld.
> >> > On the storage card I have a series of pictures(maps) in a folder named
> >> > P19.
> >> > I want to change the picture in a picturebox. I can do it OK in VB for
> >> > the
> >> > desktop but and am completely lost when it comes to doing it for the
> >> > pocketPC.
> >> > I have searched around but can't find anything to help or guide me. I
> >> > fear
> >> > I
> >> > am missing something simple. Can someone supply me with some sample
> >> > code?
> >> > Perhaps even what imports I need? I'm only a hobbyist (obsessive my
> >> > partner
> >> > says)programmer and this has me stumped.
> >> > Paul C
> >> >
> >> >
> >> >
> >>
> >>
> >>
>
>
>

Re: Mobile 6 + changing pictures by ctacke/>

ctacke/>
Wed Mar 05 14:40:23 CST 2008

The @ is *not* superfluous. It says "treat the string as a literal".
Without it the '\' characters are treated as escapes and you'd get compiler
errors in this specific case. You can omit the @ and use '\\' to escapee
the slash as well.


--

Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com



"Paul C." <PaulC@discussions.microsoft.com> wrote in message
news:0EF35F7A-2ED5-4B90-80B3-FAEA9AD7BF1A@microsoft.com...
>
> Thanks Chris,
> I think I am at last getting somewhere. It wasn't working for some reason
> &
> there seemed to be a superfluous "@" in the code. I really appreciate your
> help and will soldier on: trial and error seems to be my modus operandi.
>
>
> "<ctacke/>" wrote:
>
>> It was off the top of my head - use the Image property. What does
>> "doesn't
>> work" mean? What does it do?
>>
>> The dispose is necessary if you're cycling the pictures. It doesn't
>> dispose
>> the picturebox, it disposes the image in it. Huge diffrence.
>>
>> There's plenty of documentation. Help in Studio - MSDN online.
>>
>>
>> --
>>
>> Chris Tacke, Embedded MVP
>> OpenNETCF Consulting
>> Giving back to the embedded community
>> http://community.OpenNETCF.com
>>
>>
>> "Paul C." <PaulC@discussions.microsoft.com> wrote in message
>> news:9D50CBEE-7938-4099-8115-CEE7559966C3@microsoft.com...
>> > Not quite sure what line 1 does - disposes of the picture box if empty
>> > I
>> > assume.
>> > The second line - I don't seem to have the picture option, only image.
>> > That
>> > doesn't seem to work though.
>> > I'm persevering and will see what I can do but Is there some literature
>> > on
>> > these procedures? I really am a greenie on this although I have been
>> > throwing
>> > pictures around in various programmes since VB3. Mobile 6 is a whole
>> > new
>> > ballgame.
>> >
>> > "<ctacke/>" wrote:
>> >
>> >> If MyPictureBox.Picture != Nothing Then MyPictureBox.Picture.Dispose()
>> >> MyPictureBox.Picture = new Bitmap(@"\Storage Card\P19\MyImage1.jpg")
>> >>
>> >>
>> >> --
>> >>
>> >> Chris Tacke, Embedded MVP
>> >> OpenNETCF Consulting
>> >> Giving back to the embedded community
>> >> http://community.OpenNETCF.com
>> >>
>> >>
>> >>
>> >> "Paul C." <Paul C.@discussions.microsoft.com> wrote in message
>> >> news:24E816ED-1BEF-41CA-927B-D235C632C425@microsoft.com...
>> >> > Hi,
>> >> > I'm using Visual Basic 2005 and programming for a TyTanII handheld.
>> >> > On the storage card I have a series of pictures(maps) in a folder
>> >> > named
>> >> > P19.
>> >> > I want to change the picture in a picturebox. I can do it OK in VB
>> >> > for
>> >> > the
>> >> > desktop but and am completely lost when it comes to doing it for the
>> >> > pocketPC.
>> >> > I have searched around but can't find anything to help or guide me.
>> >> > I
>> >> > fear
>> >> > I
>> >> > am missing something simple. Can someone supply me with some sample
>> >> > code?
>> >> > Perhaps even what imports I need? I'm only a hobbyist (obsessive my
>> >> > partner
>> >> > says)programmer and this has me stumped.
>> >> > Paul C
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >>
>>
>>
>>



Re: Mobile 6 + changing pictures by PaulC

PaulC
Wed Mar 05 15:32:00 CST 2008

My programme is a GPS one and seems to work OK now, without the "@". My
system didn't want to accept the @ so I omitted it. As I said, I'm simply a
hobbyist at all this but do have a hell of a lot of fun ( & Frustration). I'm
reluctant to change to Vista for no other reason than I am perfectly happy
with XP. Does that make a difference?






"<ctacke/>" wrote:

> The @ is *not* superfluous. It says "treat the string as a literal".
> Without it the '\' characters are treated as escapes and you'd get compiler
> errors in this specific case. You can omit the @ and use '\\' to escapee
> the slash as well.
>
>
> --
>
> Chris Tacke, eMVP
> Join the Embedded Developer Community
> http://community.opennetcf.com
>
>
>
> "Paul C." <PaulC@discussions.microsoft.com> wrote in message
> news:0EF35F7A-2ED5-4B90-80B3-FAEA9AD7BF1A@microsoft.com...
> >
> > Thanks Chris,
> > I think I am at last getting somewhere. It wasn't working for some reason
> > &
> > there seemed to be a superfluous "@" in the code. I really appreciate your
> > help and will soldier on: trial and error seems to be my modus operandi.
> >
> >
> > "<ctacke/>" wrote:
> >
> >> It was off the top of my head - use the Image property. What does
> >> "doesn't
> >> work" mean? What does it do?
> >>
> >> The dispose is necessary if you're cycling the pictures. It doesn't
> >> dispose
> >> the picturebox, it disposes the image in it. Huge diffrence.
> >>
> >> There's plenty of documentation. Help in Studio - MSDN online.
> >>
> >>
> >> --
> >>
> >> Chris Tacke, Embedded MVP
> >> OpenNETCF Consulting
> >> Giving back to the embedded community
> >> http://community.OpenNETCF.com
> >>
> >>
> >> "Paul C." <PaulC@discussions.microsoft.com> wrote in message
> >> news:9D50CBEE-7938-4099-8115-CEE7559966C3@microsoft.com...
> >> > Not quite sure what line 1 does - disposes of the picture box if empty
> >> > I
> >> > assume.
> >> > The second line - I don't seem to have the picture option, only image.
> >> > That
> >> > doesn't seem to work though.
> >> > I'm persevering and will see what I can do but Is there some literature
> >> > on
> >> > these procedures? I really am a greenie on this although I have been
> >> > throwing
> >> > pictures around in various programmes since VB3. Mobile 6 is a whole
> >> > new
> >> > ballgame.
> >> >
> >> > "<ctacke/>" wrote:
> >> >
> >> >> If MyPictureBox.Picture != Nothing Then MyPictureBox.Picture.Dispose()
> >> >> MyPictureBox.Picture = new Bitmap(@"\Storage Card\P19\MyImage1.jpg")
> >> >>
> >> >>
> >> >> --
> >> >>
> >> >> Chris Tacke, Embedded MVP
> >> >> OpenNETCF Consulting
> >> >> Giving back to the embedded community
> >> >> http://community.OpenNETCF.com
> >> >>
> >> >>
> >> >>
> >> >> "Paul C." <Paul C.@discussions.microsoft.com> wrote in message
> >> >> news:24E816ED-1BEF-41CA-927B-D235C632C425@microsoft.com...
> >> >> > Hi,
> >> >> > I'm using Visual Basic 2005 and programming for a TyTanII handheld.
> >> >> > On the storage card I have a series of pictures(maps) in a folder
> >> >> > named
> >> >> > P19.
> >> >> > I want to change the picture in a picturebox. I can do it OK in VB
> >> >> > for
> >> >> > the
> >> >> > desktop but and am completely lost when it comes to doing it for the
> >> >> > pocketPC.
> >> >> > I have searched around but can't find anything to help or guide me.
> >> >> > I
> >> >> > fear
> >> >> > I
> >> >> > am missing something simple. Can someone supply me with some sample
> >> >> > code?
> >> >> > Perhaps even what imports I need? I'm only a hobbyist (obsessive my
> >> >> > partner
> >> >> > says)programmer and this has me stumped.
> >> >> > Paul C
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>

Re: Mobile 6 + changing pictures by Scott

Scott
Wed Mar 05 16:18:31 CST 2008

"<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote:
>
>The @ is *not* superfluous. It says "treat the string as a literal".
>Without it the '\' characters are treated as escapes and you'd get compiler
>errors in this specific case. You can omit the @ and use '\\' to escapee
>the slash as well.

Actually:

"Paul C." <Paul C.@discussions.microsoft.com> wrote in message
news:24E816ED-1BEF-41CA-927B-D235C632C425@microsoft.com...
> Hi,
> I'm using Visual Basic 2005 and programming for a TyTanII handheld.
> On the storage card I have a series of pictures(maps) in a folder

VB.net doesn't support the @"" string literals. It also doesn't use a
backslash to escape characters in a string, so for him it is
superfluous :)

--
--------- Scott Seligman <scott at <firstname> and michelle dot net> ---------
What do you know about hell? Would you like me to show it to you?
-- Lyta in Babylon 5:"Between the Darkness and the Light"

Re: Mobile 6 + changing pictures by ctacke/>

ctacke/>
Wed Mar 05 22:55:25 CST 2008

Bah - teaches me to try to write in that abomination you call a language.
Next time I'll write it in IL and let you translate. :)


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com



"Scott Seligman" <seligman@example.com> wrote in message
news:fqn67n$d9c$1@panix3.panix.com...
> "<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote:
>>
>>The @ is *not* superfluous. It says "treat the string as a literal".
>>Without it the '\' characters are treated as escapes and you'd get
>>compiler
>>errors in this specific case. You can omit the @ and use '\\' to escapee
>>the slash as well.
>
> Actually:
>
> "Paul C." <Paul C.@discussions.microsoft.com> wrote in message
> news:24E816ED-1BEF-41CA-927B-D235C632C425@microsoft.com...
>> Hi,
>> I'm using Visual Basic 2005 and programming for a TyTanII handheld.
>> On the storage card I have a series of pictures(maps) in a folder
>
> VB.net doesn't support the @"" string literals. It also doesn't use a
> backslash to escape characters in a string, so for him it is
> superfluous :)
>
> --
> --------- Scott Seligman <scott at <firstname> and michelle dot
> net> ---------
> What do you know about hell? Would you like me to show it to you?
> -- Lyta in Babylon 5:"Between the Darkness and the Light"