PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework Hang at PictureBox Code only with PocketPC Emulator -> Why?

Reply

Hang at PictureBox Code only with PocketPC Emulator -> Why?

 
Thread Tools Rate Thread
Old 10-06-2005, 10:32 PM   #1
Gravity
Guest
 
Posts: n/a
Default Hang at PictureBox Code only with PocketPC Emulator -> Why?


Hi,

I am confussed. I am developing an application on PocketPC using C# with
VS.net 2003. It run fine on the compiled exe. It always do.

However, when run on the emulator, be it PocketPC version 2002 or 2003, it
always hang at the same code after I narrow down the issue.

f_Bitmap = new Bitmap(new MemoryStream(f_byteDataImage));
pictureBox.Image = f_Bitmap; // This is the line that got stucked

I am surprised that it supposed to be catched, rather than being freezed.
Any ideas? The f_byteDataImage is actually a complete JPEG buffer, just like
what being read from a file.

Thanks for taking your time to read. Hope there are someone kind enought to
point some light into my confussion.


  Reply With Quote
Old 10-06-2005, 10:39 PM   #2
Ilya Tumanov [MS]
Guest
 
Posts: n/a
Default Re: Hang at PictureBox Code only with PocketPC Emulator -> Why?

Are you setting image from another thread?

If so, search this NG (link below) for "Control.Invoke" which you should use
to fix it.


Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group...framework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

"Gravity" <gravity@nospam.org> wrote in message
news:eU6PeufbFHA.2128@TK2MSFTNGP14.phx.gbl...
> Hi,
>
> I am confussed. I am developing an application on PocketPC using C# with
> VS.net 2003. It run fine on the compiled exe. It always do.
>
> However, when run on the emulator, be it PocketPC version 2002 or 2003, it
> always hang at the same code after I narrow down the issue.
>
> f_Bitmap = new Bitmap(new MemoryStream(f_byteDataImage));
> pictureBox.Image = f_Bitmap; // This is the line that got stucked
>
> I am surprised that it supposed to be catched, rather than being freezed.
> Any ideas? The f_byteDataImage is actually a complete JPEG buffer, just
> like
> what being read from a file.
>
> Thanks for taking your time to read. Hope there are someone kind enought
> to
> point some light into my confussion.
>



  Reply With Quote
Old 10-06-2005, 11:23 PM   #3
=?Utf-8?B?QWxleCBZYWtobmluIFtNVlBd?=
Guest
 
Posts: n/a
Default RE: Hang at PictureBox Code only with PocketPC Emulator -> Why?

How big is the image?
--
Alex Yakhnin, .NET CF MVP
www.intelliprog.com | www.opennetcf.org


"Gravity" wrote:

> Hi,
>
> I am confussed. I am developing an application on PocketPC using C# with
> VS.net 2003. It run fine on the compiled exe. It always do.
>
> However, when run on the emulator, be it PocketPC version 2002 or 2003, it
> always hang at the same code after I narrow down the issue.
>
> f_Bitmap = new Bitmap(new MemoryStream(f_byteDataImage));
> pictureBox.Image = f_Bitmap; // This is the line that got stucked
>
> I am surprised that it supposed to be catched, rather than being freezed.
> Any ideas? The f_byteDataImage is actually a complete JPEG buffer, just like
> what being read from a file.
>
> Thanks for taking your time to read. Hope there are someone kind enought to
> point some light into my confussion.
>
>
>

  Reply With Quote
Old 10-06-2005, 11:45 PM   #4
Gravity
Guest
 
Posts: n/a
Default Re: Hang at PictureBox Code only with PocketPC Emulator -> Why?

Small, 160x120, which work on the complied exe file, but not on the
emulator...

"Alex Yakhnin [MVP]" <a.yakhnin@online.att.net> wrote in message
news:3DE245B5-0AD7-430C-8041-C02F1C28C68F@microsoft.com...
> How big is the image?
> --
> Alex Yakhnin, .NET CF MVP
> www.intelliprog.com | www.opennetcf.org
>
>
> "Gravity" wrote:
>
>> Hi,
>>
>> I am confussed. I am developing an application on PocketPC using C# with
>> VS.net 2003. It run fine on the compiled exe. It always do.
>>
>> However, when run on the emulator, be it PocketPC version 2002 or 2003,
>> it
>> always hang at the same code after I narrow down the issue.
>>
>> f_Bitmap = new Bitmap(new MemoryStream(f_byteDataImage));
>> pictureBox.Image = f_Bitmap; // This is the line that got stucked
>>
>> I am surprised that it supposed to be catched, rather than being freezed.
>> Any ideas? The f_byteDataImage is actually a complete JPEG buffer, just
>> like
>> what being read from a file.
>>
>> Thanks for taking your time to read. Hope there are someone kind enought
>> to
>> point some light into my confussion.
>>
>>
>>



  Reply With Quote
Old 12-06-2005, 05:05 PM   #5
Gravity
Guest
 
Posts: n/a
Default Re: Hang at PictureBox Code only with PocketPC Emulator -> Why?

Thanks for the help. It work now. : )


"Ilya Tumanov [MS]" <ilyatum@online.microsoft.com> wrote in message
news:42a9fa6c$1@news.microsoft.com...
> Are you setting image from another thread?
>
> If so, search this NG (link below) for "Control.Invoke" which you should
> use to fix it.
>
>
> Best regards,
>
> Ilya
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> *** Want to find answers instantly? Here's how... ***
>
> 1. Go to
> http://groups-beta.google.com/group...framework?hl=en
> 2. Type your question in the text box near "Search this group" button.
> 3. Hit "Search this group" button.
> 4. Read answer(s).
>
> "Gravity" <gravity@nospam.org> wrote in message
> news:eU6PeufbFHA.2128@TK2MSFTNGP14.phx.gbl...
>> Hi,
>>
>> I am confussed. I am developing an application on PocketPC using C# with
>> VS.net 2003. It run fine on the compiled exe. It always do.
>>
>> However, when run on the emulator, be it PocketPC version 2002 or 2003,
>> it
>> always hang at the same code after I narrow down the issue.
>>
>> f_Bitmap = new Bitmap(new MemoryStream(f_byteDataImage));
>> pictureBox.Image = f_Bitmap; // This is the line that got stucked
>>
>> I am surprised that it supposed to be catched, rather than being freezed.
>> Any ideas? The f_byteDataImage is actually a complete JPEG buffer, just
>> like
>> what being read from a file.
>>
>> Thanks for taking your time to read. Hope there are someone kind enought
>> to
>> point some light into my confussion.
>>

>
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off