Bitmap constructor is causing an exception and the application exits. The is
under WinCE5.0, .netCF and deployed with VS2003.


Anyone else seen and / or solved this problem?



Joe

Re: Bitmap() constructor fails with C# by Chris

Chris
Wed Nov 23 09:55:49 CST 2005

A little bit of code might help us understand....

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate


"JoeB" <joe@sdfdklshj.com> wrote in message
news:O0EgrKE8FHA.252@TK2MSFTNGP15.phx.gbl...
> Bitmap constructor is causing an exception and the application exits. The
> is under WinCE5.0, .netCF and deployed with VS2003.
>
>
> Anyone else seen and / or solved this problem?
>
>
>
> Joe
>
>
>
>
>
>



Re: Bitmap() constructor fails with C# by JoeB

JoeB
Wed Nov 23 10:18:57 CST 2005

Not much to say really,


private static Bitmap bmSidePanelImage;

:
:

bmSidePanelImage = new Bitmap( "Sidebar.bmp" );


This crashes. I have tried with a png and it again crashes.




Joe






"Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in message
news:%23$JdhZE8FHA.1600@TK2MSFTNGP10.phx.gbl...
>A little bit of code might help us understand....
>
> --
> Chris Tacke
> Co-founder
> OpenNETCF.org
> Are you using the SDF? Let's do a case study.
> Email us at d c s @ o p e n n e t c f . c o m
> http://www.opennetcf.org/donate
>
>
> "JoeB" <joe@sdfdklshj.com> wrote in message
> news:O0EgrKE8FHA.252@TK2MSFTNGP15.phx.gbl...
>> Bitmap constructor is causing an exception and the application exits. The
>> is under WinCE5.0, .netCF and deployed with VS2003.
>>
>>
>> Anyone else seen and / or solved this problem?
>>
>>
>>
>> Joe
>>
>>
>>
>>
>>
>>
>
>



Re: Bitmap() constructor fails with C# by Chris

Chris
Wed Nov 23 11:44:06 CST 2005

ANd it crashes how....? A managed exception? Which one? An unmanaged
exception? Which one? Your device is? If it's not PPC, does it have
imgdecmp.dll? You have to give us enough info to help without playing 20
questions.

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate


"JoeB" <joe@sdfdklshj.com> wrote in message
news:%23D5oSlE8FHA.1484@tk2msftngp13.phx.gbl...
> Not much to say really,
>
>
> private static Bitmap bmSidePanelImage;
>
> :
> :
>
> bmSidePanelImage = new Bitmap( "Sidebar.bmp" );
>
>
> This crashes. I have tried with a png and it again crashes.
>
>
>
>
> Joe
>
>
>
>
>
>
> "Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in message
> news:%23$JdhZE8FHA.1600@TK2MSFTNGP10.phx.gbl...
>>A little bit of code might help us understand....
>>
>> --
>> Chris Tacke
>> Co-founder
>> OpenNETCF.org
>> Are you using the SDF? Let's do a case study.
>> Email us at d c s @ o p e n n e t c f . c o m
>> http://www.opennetcf.org/donate
>>
>>
>> "JoeB" <joe@sdfdklshj.com> wrote in message
>> news:O0EgrKE8FHA.252@TK2MSFTNGP15.phx.gbl...
>>> Bitmap constructor is causing an exception and the application exits.
>>> The is under WinCE5.0, .netCF and deployed with VS2003.
>>>
>>>
>>> Anyone else seen and / or solved this problem?
>>>
>>>
>>>
>>> Joe
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>



Re: Bitmap() constructor fails with C# by Sergey

Sergey
Wed Nov 23 12:33:37 CST 2005

Did you get the FileNotFoundException? Make sure that:

1. Sidebar.bmp exists in the application's directory
2. Instead of "Sidebar.bmp" use:

------------8<-------------------------------
Bitmap bmp = new Bitmap(Path.Combine(AppDir, "Sidebar.bmp"));

...

private string AppDir
{
get
{
return
Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
}
}
------------8<-------------------------------


--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com


JoeB wrote:
> Not much to say really,
>
>
> private static Bitmap bmSidePanelImage;
>
> :
> :
>
> bmSidePanelImage = new Bitmap( "Sidebar.bmp" );
>
>
> This crashes. I have tried with a png and it again crashes.
>
>
>
>
> Joe
>
>
>
>
>
>
> "Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in message
> news:%23$JdhZE8FHA.1600@TK2MSFTNGP10.phx.gbl...
>
>>A little bit of code might help us understand....
>>
>>--
>>Chris Tacke
>>Co-founder
>>OpenNETCF.org
>>Are you using the SDF? Let's do a case study.
>>Email us at d c s @ o p e n n e t c f . c o m
>>http://www.opennetcf.org/donate
>>
>>
>>"JoeB" <joe@sdfdklshj.com> wrote in message
>>news:O0EgrKE8FHA.252@TK2MSFTNGP15.phx.gbl...
>>
>>>Bitmap constructor is causing an exception and the application exits. The
>>>is under WinCE5.0, .netCF and deployed with VS2003.
>>>
>>>
>>>Anyone else seen and / or solved this problem?
>>>
>>>
>>>
>>>Joe
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>

Re: Bitmap() constructor fails with C# by JoeB

JoeB
Wed Nov 23 13:00:10 CST 2005

Hi,


I dont know enough about what is happening to be able to accuratly describe
what i see, so please do ask 1000's of questions if required.

I have the PAth.Combine wtuff in there. It does indeed appear to find the
bitmap, but fails to load it.

The exception is a show stopper, the application closes afterwards.

An unexpected error has occurred in BmpTest.exe
Select Quite and then restart this program, or select Details for more
information.

<details>

Error
BmpTest.exe
Exception

Application:Run+0xf
Form1::Main+0xa


It happens at the line of code:

string sImage = GetApplicationPath() + @"SideBarImage.png";
bmSidePanelImage = new Bitmap( sImage ); // HERE





j







"Sergey Bogdanov" <sergey.bogdanov@gmail.com> wrote in message
news:%23Rw6oxF8FHA.1188@TK2MSFTNGP12.phx.gbl...
> Did you get the FileNotFoundException? Make sure that:
>
> 1. Sidebar.bmp exists in the application's directory
> 2. Instead of "Sidebar.bmp" use:
>
> ------------8<-------------------------------
> Bitmap bmp = new Bitmap(Path.Combine(AppDir, "Sidebar.bmp"));
>
> ...
>
> private string AppDir
> {
> get
> {
> return
> Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
> }
> }
> ------------8<-------------------------------
>
>
> --
> Sergey Bogdanov [.NET CF MVP, MCSD]
> http://www.sergeybogdanov.com
>
>
> JoeB wrote:
>> Not much to say really,
>>
>>
>> private static Bitmap bmSidePanelImage;
>>
>> :
>> :
>>
>> bmSidePanelImage = new Bitmap( "Sidebar.bmp" );
>>
>>
>> This crashes. I have tried with a png and it again crashes.
>>
>>
>>
>>
>> Joe
>>
>>
>>
>>
>>
>>
>> "Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in message
>> news:%23$JdhZE8FHA.1600@TK2MSFTNGP10.phx.gbl...
>>
>>>A little bit of code might help us understand....
>>>
>>>--
>>>Chris Tacke
>>>Co-founder
>>>OpenNETCF.org
>>>Are you using the SDF? Let's do a case study.
>>>Email us at d c s @ o p e n n e t c f . c o m
>>>http://www.opennetcf.org/donate
>>>
>>>
>>>"JoeB" <joe@sdfdklshj.com> wrote in message
>>>news:O0EgrKE8FHA.252@TK2MSFTNGP15.phx.gbl...
>>>
>>>>Bitmap constructor is causing an exception and the application exits.
>>>>The is under WinCE5.0, .netCF and deployed with VS2003.
>>>>
>>>>
>>>>Anyone else seen and / or solved this problem?
>>>>
>>>>
>>>>
>>>>Joe
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>


Re: Bitmap() constructor fails with C# by Chris

Chris
Wed Nov 23 13:10:31 CST 2005

Again, what device is this on?

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate


"JoeB" <joe@sdfdklshj.com> wrote in message
news:urmLY$F8FHA.2364@TK2MSFTNGP12.phx.gbl...
> Hi,
>
>
> I dont know enough about what is happening to be able to accuratly
> describe what i see, so please do ask 1000's of questions if required.
>
> I have the PAth.Combine wtuff in there. It does indeed appear to find the
> bitmap, but fails to load it.
>
> The exception is a show stopper, the application closes afterwards.
>
> An unexpected error has occurred in BmpTest.exe
> Select Quite and then restart this program, or select Details for more
> information.
>
> <details>
>
> Error
> BmpTest.exe
> Exception
>
> Application:Run+0xf
> Form1::Main+0xa
>
>
> It happens at the line of code:
>
> string sImage = GetApplicationPath() + @"SideBarImage.png";
> bmSidePanelImage = new Bitmap( sImage ); // HERE
>
>
>
>
>
> j
>
>
>
>
>
>
>
> "Sergey Bogdanov" <sergey.bogdanov@gmail.com> wrote in message
> news:%23Rw6oxF8FHA.1188@TK2MSFTNGP12.phx.gbl...
>> Did you get the FileNotFoundException? Make sure that:
>>
>> 1. Sidebar.bmp exists in the application's directory
>> 2. Instead of "Sidebar.bmp" use:
>>
>> ------------8<-------------------------------
>> Bitmap bmp = new Bitmap(Path.Combine(AppDir, "Sidebar.bmp"));
>>
>> ...
>>
>> private string AppDir
>> {
>> get
>> {
>> return
>> Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
>> }
>> }
>> ------------8<-------------------------------
>>
>>
>> --
>> Sergey Bogdanov [.NET CF MVP, MCSD]
>> http://www.sergeybogdanov.com
>>
>>
>> JoeB wrote:
>>> Not much to say really,
>>>
>>>
>>> private static Bitmap bmSidePanelImage;
>>>
>>> :
>>> :
>>>
>>> bmSidePanelImage = new Bitmap( "Sidebar.bmp" );
>>>
>>>
>>> This crashes. I have tried with a png and it again crashes.
>>>
>>>
>>>
>>>
>>> Joe
>>>
>>>
>>>
>>>
>>>
>>>
>>> "Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in message
>>> news:%23$JdhZE8FHA.1600@TK2MSFTNGP10.phx.gbl...
>>>
>>>>A little bit of code might help us understand....
>>>>
>>>>--
>>>>Chris Tacke
>>>>Co-founder
>>>>OpenNETCF.org
>>>>Are you using the SDF? Let's do a case study.
>>>>Email us at d c s @ o p e n n e t c f . c o m
>>>>http://www.opennetcf.org/donate
>>>>
>>>>
>>>>"JoeB" <joe@sdfdklshj.com> wrote in message
>>>>news:O0EgrKE8FHA.252@TK2MSFTNGP15.phx.gbl...
>>>>
>>>>>Bitmap constructor is causing an exception and the application exits.
>>>>>The is under WinCE5.0, .netCF and deployed with VS2003.
>>>>>
>>>>>
>>>>>Anyone else seen and / or solved this problem?
>>>>>
>>>>>
>>>>>
>>>>>Joe
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>



Re: Bitmap() constructor fails with C# by JoeB

JoeB
Wed Nov 23 15:17:37 CST 2005

WinCe5.0, .netCF 1.0.4292.00





"Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in message
news:OrCWUGG8FHA.3880@TK2MSFTNGP12.phx.gbl...
> Again, what device is this on?
>
> --
> Chris Tacke
> Co-founder
> OpenNETCF.org
> Are you using the SDF? Let's do a case study.
> Email us at d c s @ o p e n n e t c f . c o m
> http://www.opennetcf.org/donate
>
>
> "JoeB" <joe@sdfdklshj.com> wrote in message
> news:urmLY$F8FHA.2364@TK2MSFTNGP12.phx.gbl...
>> Hi,
>>
>>
>> I dont know enough about what is happening to be able to accuratly
>> describe what i see, so please do ask 1000's of questions if required.
>>
>> I have the PAth.Combine wtuff in there. It does indeed appear to find the
>> bitmap, but fails to load it.
>>
>> The exception is a show stopper, the application closes afterwards.
>>
>> An unexpected error has occurred in BmpTest.exe
>> Select Quite and then restart this program, or select Details for more
>> information.
>>
>> <details>
>>
>> Error
>> BmpTest.exe
>> Exception
>>
>> Application:Run+0xf
>> Form1::Main+0xa
>>
>>
>> It happens at the line of code:
>>
>> string sImage = GetApplicationPath() + @"SideBarImage.png";
>> bmSidePanelImage = new Bitmap( sImage ); // HERE
>>
>>
>>
>>
>>
>> j
>>
>>
>>
>>
>>
>>
>>
>> "Sergey Bogdanov" <sergey.bogdanov@gmail.com> wrote in message
>> news:%23Rw6oxF8FHA.1188@TK2MSFTNGP12.phx.gbl...
>>> Did you get the FileNotFoundException? Make sure that:
>>>
>>> 1. Sidebar.bmp exists in the application's directory
>>> 2. Instead of "Sidebar.bmp" use:
>>>
>>> ------------8<-------------------------------
>>> Bitmap bmp = new Bitmap(Path.Combine(AppDir, "Sidebar.bmp"));
>>>
>>> ...
>>>
>>> private string AppDir
>>> {
>>> get
>>> {
>>> return
>>> Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
>>> }
>>> }
>>> ------------8<-------------------------------
>>>
>>>
>>> --
>>> Sergey Bogdanov [.NET CF MVP, MCSD]
>>> http://www.sergeybogdanov.com
>>>
>>>
>>> JoeB wrote:
>>>> Not much to say really,
>>>>
>>>>
>>>> private static Bitmap bmSidePanelImage;
>>>>
>>>> :
>>>> :
>>>>
>>>> bmSidePanelImage = new Bitmap( "Sidebar.bmp" );
>>>>
>>>>
>>>> This crashes. I have tried with a png and it again crashes.
>>>>
>>>>
>>>>
>>>>
>>>> Joe
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> "Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in message
>>>> news:%23$JdhZE8FHA.1600@TK2MSFTNGP10.phx.gbl...
>>>>
>>>>>A little bit of code might help us understand....
>>>>>
>>>>>--
>>>>>Chris Tacke
>>>>>Co-founder
>>>>>OpenNETCF.org
>>>>>Are you using the SDF? Let's do a case study.
>>>>>Email us at d c s @ o p e n n e t c f . c o m
>>>>>http://www.opennetcf.org/donate
>>>>>
>>>>>
>>>>>"JoeB" <joe@sdfdklshj.com> wrote in message
>>>>>news:O0EgrKE8FHA.252@TK2MSFTNGP15.phx.gbl...
>>>>>
>>>>>>Bitmap constructor is causing an exception and the application exits.
>>>>>>The is under WinCE5.0, .netCF and deployed with VS2003.
>>>>>>
>>>>>>
>>>>>>Anyone else seen and / or solved this problem?
>>>>>>
>>>>>>
>>>>>>
>>>>>>Joe
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>
>
>



Re: Bitmap() constructor fails with C# by Chris

Chris
Wed Nov 23 16:16:01 CST 2005

Ahhh, so now we're getting somewhere. My bet is your image doesn't have the
proper imaging DLL, so the underlying classes are not able to load them. In
4.2 it was imgdecmp.dll, which loads with PIE or through manual BIB editing
(it's not directly in the catalog). Add PIE to your platform and see if it
works - if it does, then you'll have to do some work to just get the imaging
library into your build (assuming you don't want PIE of course).

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate


"JoeB" <joe@sdfdklshj.com> wrote in message
news:ur%238LMH8FHA.2816@tk2msftngp13.phx.gbl...
> WinCe5.0, .netCF 1.0.4292.00
>
>
>
>
>
> "Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in message
> news:OrCWUGG8FHA.3880@TK2MSFTNGP12.phx.gbl...
>> Again, what device is this on?
>>
>> --
>> Chris Tacke
>> Co-founder
>> OpenNETCF.org
>> Are you using the SDF? Let's do a case study.
>> Email us at d c s @ o p e n n e t c f . c o m
>> http://www.opennetcf.org/donate
>>
>>
>> "JoeB" <joe@sdfdklshj.com> wrote in message
>> news:urmLY$F8FHA.2364@TK2MSFTNGP12.phx.gbl...
>>> Hi,
>>>
>>>
>>> I dont know enough about what is happening to be able to accuratly
>>> describe what i see, so please do ask 1000's of questions if required.
>>>
>>> I have the PAth.Combine wtuff in there. It does indeed appear to find
>>> the bitmap, but fails to load it.
>>>
>>> The exception is a show stopper, the application closes afterwards.
>>>
>>> An unexpected error has occurred in BmpTest.exe
>>> Select Quite and then restart this program, or select Details for more
>>> information.
>>>
>>> <details>
>>>
>>> Error
>>> BmpTest.exe
>>> Exception
>>>
>>> Application:Run+0xf
>>> Form1::Main+0xa
>>>
>>>
>>> It happens at the line of code:
>>>
>>> string sImage = GetApplicationPath() + @"SideBarImage.png";
>>> bmSidePanelImage = new Bitmap( sImage ); // HERE
>>>
>>>
>>>
>>>
>>>
>>> j
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> "Sergey Bogdanov" <sergey.bogdanov@gmail.com> wrote in message
>>> news:%23Rw6oxF8FHA.1188@TK2MSFTNGP12.phx.gbl...
>>>> Did you get the FileNotFoundException? Make sure that:
>>>>
>>>> 1. Sidebar.bmp exists in the application's directory
>>>> 2. Instead of "Sidebar.bmp" use:
>>>>
>>>> ------------8<-------------------------------
>>>> Bitmap bmp = new Bitmap(Path.Combine(AppDir, "Sidebar.bmp"));
>>>>
>>>> ...
>>>>
>>>> private string AppDir
>>>> {
>>>> get
>>>> {
>>>> return
>>>> Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
>>>> }
>>>> }
>>>> ------------8<-------------------------------
>>>>
>>>>
>>>> --
>>>> Sergey Bogdanov [.NET CF MVP, MCSD]
>>>> http://www.sergeybogdanov.com
>>>>
>>>>
>>>> JoeB wrote:
>>>>> Not much to say really,
>>>>>
>>>>>
>>>>> private static Bitmap bmSidePanelImage;
>>>>>
>>>>> :
>>>>> :
>>>>>
>>>>> bmSidePanelImage = new Bitmap( "Sidebar.bmp" );
>>>>>
>>>>>
>>>>> This crashes. I have tried with a png and it again crashes.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Joe
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> "Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in message
>>>>> news:%23$JdhZE8FHA.1600@TK2MSFTNGP10.phx.gbl...
>>>>>
>>>>>>A little bit of code might help us understand....
>>>>>>
>>>>>>--
>>>>>>Chris Tacke
>>>>>>Co-founder
>>>>>>OpenNETCF.org
>>>>>>Are you using the SDF? Let's do a case study.
>>>>>>Email us at d c s @ o p e n n e t c f . c o m
>>>>>>http://www.opennetcf.org/donate
>>>>>>
>>>>>>
>>>>>>"JoeB" <joe@sdfdklshj.com> wrote in message
>>>>>>news:O0EgrKE8FHA.252@TK2MSFTNGP15.phx.gbl...
>>>>>>
>>>>>>>Bitmap constructor is causing an exception and the application exits.
>>>>>>>The is under WinCE5.0, .netCF and deployed with VS2003.
>>>>>>>
>>>>>>>
>>>>>>>Anyone else seen and / or solved this problem?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>Joe
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
>>
>>
>
>



Re: Bitmap() constructor fails with C# by JoeB

JoeB
Thu Nov 24 05:56:35 CST 2005

PIE is already included in the image. The bitmaps used to load, then one
day (without a change to the image) they stopped working.

My best guess is visual studio is currupting the device some how during
deploy. Once the device has been currupted, it never recovers. We have
several devices, all with the same bin file installed, and some work, some
dont - very strange.






j



"Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in message
news:eZfE%23tH8FHA.956@TK2MSFTNGP10.phx.gbl...
> Ahhh, so now we're getting somewhere. My bet is your image doesn't have
> the proper imaging DLL, so the underlying classes are not able to load
> them. In 4.2 it was imgdecmp.dll, which loads with PIE or through manual
> BIB editing (it's not directly in the catalog). Add PIE to your platform
> and see if it works - if it does, then you'll have to do some work to just
> get the imaging library into your build (assuming you don't want PIE of
> course).
>
> --
> Chris Tacke
> Co-founder
> OpenNETCF.org
> Are you using the SDF? Let's do a case study.
> Email us at d c s @ o p e n n e t c f . c o m
> http://www.opennetcf.org/donate
>
>
> "JoeB" <joe@sdfdklshj.com> wrote in message
> news:ur%238LMH8FHA.2816@tk2msftngp13.phx.gbl...
>> WinCe5.0, .netCF 1.0.4292.00
>>
>>
>>
>>
>>
>> "Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in message
>> news:OrCWUGG8FHA.3880@TK2MSFTNGP12.phx.gbl...
>>> Again, what device is this on?
>>>
>>> --
>>> Chris Tacke
>>> Co-founder
>>> OpenNETCF.org
>>> Are you using the SDF? Let's do a case study.
>>> Email us at d c s @ o p e n n e t c f . c o m
>>> http://www.opennetcf.org/donate
>>>
>>>
>>> "JoeB" <joe@sdfdklshj.com> wrote in message
>>> news:urmLY$F8FHA.2364@TK2MSFTNGP12.phx.gbl...
>>>> Hi,
>>>>
>>>>
>>>> I dont know enough about what is happening to be able to accuratly
>>>> describe what i see, so please do ask 1000's of questions if required.
>>>>
>>>> I have the PAth.Combine wtuff in there. It does indeed appear to find
>>>> the bitmap, but fails to load it.
>>>>
>>>> The exception is a show stopper, the application closes afterwards.
>>>>
>>>> An unexpected error has occurred in BmpTest.exe
>>>> Select Quite and then restart this program, or select Details for more
>>>> information.
>>>>
>>>> <details>
>>>>
>>>> Error
>>>> BmpTest.exe
>>>> Exception
>>>>
>>>> Application:Run+0xf
>>>> Form1::Main+0xa
>>>>
>>>>
>>>> It happens at the line of code:
>>>>
>>>> string sImage = GetApplicationPath() + @"SideBarImage.png";
>>>> bmSidePanelImage = new Bitmap( sImage ); // HERE
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> j
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> "Sergey Bogdanov" <sergey.bogdanov@gmail.com> wrote in message
>>>> news:%23Rw6oxF8FHA.1188@TK2MSFTNGP12.phx.gbl...
>>>>> Did you get the FileNotFoundException? Make sure that:
>>>>>
>>>>> 1. Sidebar.bmp exists in the application's directory
>>>>> 2. Instead of "Sidebar.bmp" use:
>>>>>
>>>>> ------------8<-------------------------------
>>>>> Bitmap bmp = new Bitmap(Path.Combine(AppDir, "Sidebar.bmp"));
>>>>>
>>>>> ...
>>>>>
>>>>> private string AppDir
>>>>> {
>>>>> get
>>>>> {
>>>>> return
>>>>> Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
>>>>> }
>>>>> }
>>>>> ------------8<-------------------------------
>>>>>
>>>>>
>>>>> --
>>>>> Sergey Bogdanov [.NET CF MVP, MCSD]
>>>>> http://www.sergeybogdanov.com
>>>>>
>>>>>
>>>>> JoeB wrote:
>>>>>> Not much to say really,
>>>>>>
>>>>>>
>>>>>> private static Bitmap bmSidePanelImage;
>>>>>>
>>>>>> :
>>>>>> :
>>>>>>
>>>>>> bmSidePanelImage = new Bitmap( "Sidebar.bmp" );
>>>>>>
>>>>>>
>>>>>> This crashes. I have tried with a png and it again crashes.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Joe
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> "Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in message
>>>>>> news:%23$JdhZE8FHA.1600@TK2MSFTNGP10.phx.gbl...
>>>>>>
>>>>>>>A little bit of code might help us understand....
>>>>>>>
>>>>>>>--
>>>>>>>Chris Tacke
>>>>>>>Co-founder
>>>>>>>OpenNETCF.org
>>>>>>>Are you using the SDF? Let's do a case study.
>>>>>>>Email us at d c s @ o p e n n e t c f . c o m
>>>>>>>http://www.opennetcf.org/donate
>>>>>>>
>>>>>>>
>>>>>>>"JoeB" <joe@sdfdklshj.com> wrote in message
>>>>>>>news:O0EgrKE8FHA.252@TK2MSFTNGP15.phx.gbl...
>>>>>>>
>>>>>>>>Bitmap constructor is causing an exception and the application
>>>>>>>>exits. The is under WinCE5.0, .netCF and deployed with VS2003.
>>>>>>>>
>>>>>>>>
>>>>>>>>Anyone else seen and / or solved this problem?
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>Joe
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>>
>>>
>>
>>
>
>



Re: Bitmap() constructor fails with C# by ctacke/>

ctacke/>
Thu Nov 24 06:39:21 CST 2005

So if you push the app to the device without Studio (a storage card, USB,
ActiveSyc, etc.) and run it does it fail?

-Chris


"JoeB" <joe@sdfdklshj.com> wrote in message
news:uL6lV3O8FHA.736@TK2MSFTNGP09.phx.gbl...
> PIE is already included in the image. The bitmaps used to load, then one
> day (without a change to the image) they stopped working.
>
> My best guess is visual studio is currupting the device some how during
> deploy. Once the device has been currupted, it never recovers. We have
> several devices, all with the same bin file installed, and some work, some
> dont - very strange.
>
>
>
>
>
>
> j
>
>
>
> "Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in message
> news:eZfE%23tH8FHA.956@TK2MSFTNGP10.phx.gbl...
>> Ahhh, so now we're getting somewhere. My bet is your image doesn't have
>> the proper imaging DLL, so the underlying classes are not able to load
>> them. In 4.2 it was imgdecmp.dll, which loads with PIE or through manual
>> BIB editing (it's not directly in the catalog). Add PIE to your platform
>> and see if it works - if it does, then you'll have to do some work to
>> just get the imaging library into your build (assuming you don't want PIE
>> of course).
>>
>> --
>> Chris Tacke
>> Co-founder
>> OpenNETCF.org
>> Are you using the SDF? Let's do a case study.
>> Email us at d c s @ o p e n n e t c f . c o m
>> http://www.opennetcf.org/donate
>>
>>
>> "JoeB" <joe@sdfdklshj.com> wrote in message
>> news:ur%238LMH8FHA.2816@tk2msftngp13.phx.gbl...
>>> WinCe5.0, .netCF 1.0.4292.00
>>>
>>>
>>>
>>>
>>>
>>> "Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in message
>>> news:OrCWUGG8FHA.3880@TK2MSFTNGP12.phx.gbl...
>>>> Again, what device is this on?
>>>>
>>>> --
>>>> Chris Tacke
>>>> Co-founder
>>>> OpenNETCF.org
>>>> Are you using the SDF? Let's do a case study.
>>>> Email us at d c s @ o p e n n e t c f . c o m
>>>> http://www.opennetcf.org/donate
>>>>
>>>>
>>>> "JoeB" <joe@sdfdklshj.com> wrote in message
>>>> news:urmLY$F8FHA.2364@TK2MSFTNGP12.phx.gbl...
>>>>> Hi,
>>>>>
>>>>>
>>>>> I dont know enough about what is happening to be able to accuratly
>>>>> describe what i see, so please do ask 1000's of questions if required.
>>>>>
>>>>> I have the PAth.Combine wtuff in there. It does indeed appear to find
>>>>> the bitmap, but fails to load it.
>>>>>
>>>>> The exception is a show stopper, the application closes afterwards.
>>>>>
>>>>> An unexpected error has occurred in BmpTest.exe
>>>>> Select Quite and then restart this program, or select Details for more
>>>>> information.
>>>>>
>>>>> <details>
>>>>>
>>>>> Error
>>>>> BmpTest.exe
>>>>> Exception
>>>>>
>>>>> Application:Run+0xf
>>>>> Form1::Main+0xa
>>>>>
>>>>>
>>>>> It happens at the line of code:
>>>>>
>>>>> string sImage = GetApplicationPath() + @"SideBarImage.png";
>>>>> bmSidePanelImage = new Bitmap( sImage ); // HERE
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> j
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> "Sergey Bogdanov" <sergey.bogdanov@gmail.com> wrote in message
>>>>> news:%23Rw6oxF8FHA.1188@TK2MSFTNGP12.phx.gbl...
>>>>>> Did you get the FileNotFoundException? Make sure that:
>>>>>>
>>>>>> 1. Sidebar.bmp exists in the application's directory
>>>>>> 2. Instead of "Sidebar.bmp" use:
>>>>>>
>>>>>> ------------8<-------------------------------
>>>>>> Bitmap bmp = new Bitmap(Path.Combine(AppDir, "Sidebar.bmp"));
>>>>>>
>>>>>> ...
>>>>>>
>>>>>> private string AppDir
>>>>>> {
>>>>>> get
>>>>>> {
>>>>>> return
>>>>>> Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
>>>>>> }
>>>>>> }
>>>>>> ------------8<-------------------------------
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sergey Bogdanov [.NET CF MVP, MCSD]
>>>>>> http://www.sergeybogdanov.com
>>>>>>
>>>>>>
>>>>>> JoeB wrote:
>>>>>>> Not much to say really,
>>>>>>>
>>>>>>>
>>>>>>> private static Bitmap bmSidePanelImage;
>>>>>>>
>>>>>>> :
>>>>>>> :
>>>>>>>
>>>>>>> bmSidePanelImage = new Bitmap( "Sidebar.bmp" );
>>>>>>>
>>>>>>>
>>>>>>> This crashes. I have tried with a png and it again crashes.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Joe
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> "Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in message
>>>>>>> news:%23$JdhZE8FHA.1600@TK2MSFTNGP10.phx.gbl...
>>>>>>>
>>>>>>>>A little bit of code might help us understand....
>>>>>>>>
>>>>>>>>--
>>>>>>>>Chris Tacke
>>>>>>>>Co-founder
>>>>>>>>OpenNETCF.org
>>>>>>>>Are you using the SDF? Let's do a case study.
>>>>>>>>Email us at d c s @ o p e n n e t c f . c o m
>>>>>>>>http://www.opennetcf.org/donate
>>>>>>>>
>>>>>>>>
>>>>>>>>"JoeB" <joe@sdfdklshj.com> wrote in message
>>>>>>>>news:O0EgrKE8FHA.252@TK2MSFTNGP15.phx.gbl...
>>>>>>>>
>>>>>>>>>Bitmap constructor is causing an exception and the application
>>>>>>>>>exits. The is under WinCE5.0, .netCF and deployed with VS2003.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>Anyone else seen and / or solved this problem?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>Joe
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



Re: Bitmap() constructor fails with C# by JoeB

JoeB
Tue Nov 29 15:09:40 CST 2005

Hi


Been doing some tests on this issue over the last few days... If i take a
brand new device out of the box, never programmed, and put a platform image
on to it, then load my software to the device via platform builder file
viewer, then completly disconnect from the device, and run my app it runs as
expected.


Now i can restart the device, whatever.. the program always runs.

If i deploy from visual studio to the device and install the cab files it
wants me to install, and deploy anything at all, not necessary the program
in question, i can never run another application on the device. Ever, no
matter what i do. - reload the platform bin file, delete the registy, nope,
neither allow the software to run again.


If i flash the NAND storage on the device back to factory setup, and reload
the platform bin file, and my program it runs again.

Deploying from visual studio is perminantly breaking somthing that causes my
app to fail, and only by reformatting the nand and reloading the platform
bin file can i get it to work again.



j



"<ctacke/>" <ctacke_AT_OpenNETCF_com> wrote in message
news:eZLSeRP8FHA.3132@TK2MSFTNGP12.phx.gbl...
> So if you push the app to the device without Studio (a storage card, USB,
> ActiveSyc, etc.) and run it does it fail?
>
> -Chris
>
>
> "JoeB" <joe@sdfdklshj.com> wrote in message
> news:uL6lV3O8FHA.736@TK2MSFTNGP09.phx.gbl...
>> PIE is already included in the image. The bitmaps used to load, then one
>> day (without a change to the image) they stopped working.
>>
>> My best guess is visual studio is currupting the device some how during
>> deploy. Once the device has been currupted, it never recovers. We have
>> several devices, all with the same bin file installed, and some work,
>> some dont - very strange.
>>
>>
>>
>>
>>
>>
>> j
>>
>>
>>
>> "Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in message
>> news:eZfE%23tH8FHA.956@TK2MSFTNGP10.phx.gbl...
>>> Ahhh, so now we're getting somewhere. My bet is your image doesn't have
>>> the proper imaging DLL, so the underlying classes are not able to load
>>> them. In 4.2 it was imgdecmp.dll, which loads with PIE or through
>>> manual BIB editing (it's not directly in the catalog). Add PIE to your
>>> platform and see if it works - if it does, then you'll have to do some
>>> work to just get the imaging library into your build (assuming you don't
>>> want PIE of course).
>>>
>>> --
>>> Chris Tacke
>>> Co-founder
>>> OpenNETCF.org
>>> Are you using the SDF? Let's do a case study.
>>> Email us at d c s @ o p e n n e t c f . c o m
>>> http://www.opennetcf.org/donate
>>>
>>>
>>> "JoeB" <joe@sdfdklshj.com> wrote in message
>>> news:ur%238LMH8FHA.2816@tk2msftngp13.phx.gbl...
>>>> WinCe5.0, .netCF 1.0.4292.00
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> "Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in message
>>>> news:OrCWUGG8FHA.3880@TK2MSFTNGP12.phx.gbl...
>>>>> Again, what device is this on?
>>>>>
>>>>> --
>>>>> Chris Tacke
>>>>> Co-founder
>>>>> OpenNETCF.org
>>>>> Are you using the SDF? Let's do a case study.
>>>>> Email us at d c s @ o p e n n e t c f . c o m
>>>>> http://www.opennetcf.org/donate
>>>>>
>>>>>
>>>>> "JoeB" <joe@sdfdklshj.com> wrote in message
>>>>> news:urmLY$F8FHA.2364@TK2MSFTNGP12.phx.gbl...
>>>>>> Hi,
>>>>>>
>>>>>>
>>>>>> I dont know enough about what is happening to be able to accuratly
>>>>>> describe what i see, so please do ask 1000's of questions if
>>>>>> required.
>>>>>>
>>>>>> I have the PAth.Combine wtuff in there. It does indeed appear to find
>>>>>> the bitmap, but fails to load it.
>>>>>>
>>>>>> The exception is a show stopper, the application closes afterwards.
>>>>>>
>>>>>> An unexpected error has occurred in BmpTest.exe
>>>>>> Select Quite and then restart this program, or select Details for
>>>>>> more information.
>>>>>>
>>>>>> <details>
>>>>>>
>>>>>> Error
>>>>>> BmpTest.exe
>>>>>> Exception
>>>>>>
>>>>>> Application:Run+0xf
>>>>>> Form1::Main+0xa
>>>>>>
>>>>>>
>>>>>> It happens at the line of code:
>>>>>>
>>>>>> string sImage = GetApplicationPath() + @"SideBarImage.png";
>>>>>> bmSidePanelImage = new Bitmap( sImage ); // HERE
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> j
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> "Sergey Bogdanov" <sergey.bogdanov@gmail.com> wrote in message
>>>>>> news:%23Rw6oxF8FHA.1188@TK2MSFTNGP12.phx.gbl...
>>>>>>> Did you get the FileNotFoundException? Make sure that:
>>>>>>>
>>>>>>> 1. Sidebar.bmp exists in the application's directory
>>>>>>> 2. Instead of "Sidebar.bmp" use:
>>>>>>>
>>>>>>> ------------8<-------------------------------
>>>>>>> Bitmap bmp = new Bitmap(Path.Combine(AppDir, "Sidebar.bmp"));
>>>>>>>
>>>>>>> ...
>>>>>>>
>>>>>>> private string AppDir
>>>>>>> {
>>>>>>> get
>>>>>>> {
>>>>>>> return
>>>>>>> Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
>>>>>>> }
>>>>>>> }
>>>>>>> ------------8<-------------------------------
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Sergey Bogdanov [.NET CF MVP, MCSD]
>>>>>>> http://www.sergeybogdanov.com
>>>>>>>
>>>>>>>
>>>>>>> JoeB wrote:
>>>>>>>> Not much to say really,
>>>>>>>>
>>>>>>>>
>>>>>>>> private static Bitmap bmSidePanelImage;
>>>>>>>>
>>>>>>>> :
>>>>>>>> :
>>>>>>>>
>>>>>>>> bmSidePanelImage = new Bitmap( "Sidebar.bmp" );
>>>>>>>>
>>>>>>>>
>>>>>>>> This crashes. I have tried with a png and it again crashes.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Joe
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> "Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in
>>>>>>>> message news:%23$JdhZE8FHA.1600@TK2MSFTNGP10.phx.gbl...
>>>>>>>>
>>>>>>>>>A little bit of code might help us understand....
>>>>>>>>>
>>>>>>>>>--
>>>>>>>>>Chris Tacke
>>>>>>>>>Co-founder
>>>>>>>>>OpenNETCF.org
>>>>>>>>>Are you using the SDF? Let's do a case study.
>>>>>>>>>Email us at d c s @ o p e n n e t c f . c o m
>>>>>>>>>http://www.opennetcf.org/donate
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>"JoeB" <joe@sdfdklshj.com> wrote in message
>>>>>>>>>news:O0EgrKE8FHA.252@TK2MSFTNGP15.phx.gbl...
>>>>>>>>>
>>>>>>>>>>Bitmap constructor is causing an exception and the application
>>>>>>>>>>exits. The is under WinCE5.0, .netCF and deployed with VS2003.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>Anyone else seen and / or solved this problem?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>Joe
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



Re: Bitmap() constructor fails with C# by Chris

Chris
Tue Nov 29 15:55:28 CST 2005

Yep, I can verify that it occurs on any system with a persistent registry
and is the cause for many a support call. Take a look at my blog entry:

http://blog.opennetcf.org/ctacke/PermaLink,guid,69a37b32-4448-4ea4-bd2b-9aa6fb3374f7.aspx

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate


"JoeB" <joe@sdfdklshj.com> wrote in message
news:e4EitjS9FHA.1844@TK2MSFTNGP11.phx.gbl...
> Hi
>
>
> Been doing some tests on this issue over the last few days... If i take a
> brand new device out of the box, never programmed, and put a platform
> image on to it, then load my software to the device via platform builder
> file viewer, then completly disconnect from the device, and run my app it
> runs as expected.
>
>
> Now i can restart the device, whatever.. the program always runs.
>
> If i deploy from visual studio to the device and install the cab files it
> wants me to install, and deploy anything at all, not necessary the program
> in question, i can never run another application on the device. Ever, no
> matter what i do. - reload the platform bin file, delete the registy,
> nope, neither allow the software to run again.
>
>
> If i flash the NAND storage on the device back to factory setup, and
> reload the platform bin file, and my program it runs again.
>
> Deploying from visual studio is perminantly breaking somthing that causes
> my app to fail, and only by reformatting the nand and reloading the
> platform bin file can i get it to work again.
>
>
>
> j
>
>
>
> "<ctacke/>" <ctacke_AT_OpenNETCF_com> wrote in message
> news:eZLSeRP8FHA.3132@TK2MSFTNGP12.phx.gbl...
>> So if you push the app to the device without Studio (a storage card, USB,
>> ActiveSyc, etc.) and run it does it fail?
>>
>> -Chris
>>
>>
>> "JoeB" <joe@sdfdklshj.com> wrote in message
>> news:uL6lV3O8FHA.736@TK2MSFTNGP09.phx.gbl...
>>> PIE is already included in the image. The bitmaps used to load, then
>>> one day (without a change to the image) they stopped working.
>>>
>>> My best guess is visual studio is currupting the device some how during
>>> deploy. Once the device has been currupted, it never recovers. We have
>>> several devices, all with the same bin file installed, and some work,
>>> some dont - very strange.
>>>
>>>
>>>
>>>
>>>
>>>
>>> j
>>>
>>>
>>>
>>> "Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in message
>>> news:eZfE%23tH8FHA.956@TK2MSFTNGP10.phx.gbl...
>>>> Ahhh, so now we're getting somewhere. My bet is your image doesn't
>>>> have the proper imaging DLL, so the underlying classes are not able to
>>>> load them. In 4.2 it was imgdecmp.dll, which loads with PIE or through
>>>> manual BIB editing (it's not directly in the catalog). Add PIE to your
>>>> platform and see if it works - if it does, then you'll have to do some
>>>> work to just get the imaging library into your build (assuming you
>>>> don't want PIE of course).
>>>>
>>>> --
>>>> Chris Tacke
>>>> Co-founder
>>>> OpenNETCF.org
>>>> Are you using the SDF? Let's do a case study.
>>>> Email us at d c s @ o p e n n e t c f . c o m
>>>> http://www.opennetcf.org/donate
>>>>
>>>>
>>>> "JoeB" <joe@sdfdklshj.com> wrote in message
>>>> news:ur%238LMH8FHA.2816@tk2msftngp13.phx.gbl...
>>>>> WinCe5.0, .netCF 1.0.4292.00
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> "Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in message
>>>>> news:OrCWUGG8FHA.3880@TK2MSFTNGP12.phx.gbl...
>>>>>> Again, what device is this on?
>>>>>>
>>>>>> --
>>>>>> Chris Tacke
>>>>>> Co-founder
>>>>>> OpenNETCF.org
>>>>>> Are you using the SDF? Let's do a case study.
>>>>>> Email us at d c s @ o p e n n e t c f . c o m
>>>>>> http://www.opennetcf.org/donate
>>>>>>
>>>>>>
>>>>>> "JoeB" <joe@sdfdklshj.com> wrote in message
>>>>>> news:urmLY$F8FHA.2364@TK2MSFTNGP12.phx.gbl...
>>>>>>> Hi,
>>>>>>>
>>>>>>>
>>>>>>> I dont know enough about what is happening to be able to accuratly
>>>>>>> describe what i see, so please do ask 1000's of questions if
>>>>>>> required.
>>>>>>>
>>>>>>> I have the PAth.Combine wtuff in there. It does indeed appear to
>>>>>>> find the bitmap, but fails to load it.
>>>>>>>
>>>>>>> The exception is a show stopper, the application closes afterwards.
>>>>>>>
>>>>>>> An unexpected error has occurred in BmpTest.exe
>>>>>>> Select Quite and then restart this program, or select Details for
>>>>>>> more information.
>>>>>>>
>>>>>>> <details>
>>>>>>>
>>>>>>> Error
>>>>>>> BmpTest.exe
>>>>>>> Exception
>>>>>>>
>>>>>>> Application:Run+0xf
>>>>>>> Form1::Main+0xa
>>>>>>>
>>>>>>>
>>>>>>> It happens at the line of code:
>>>>>>>
>>>>>>> string sImage = GetApplicationPath() + @"SideBarImage.png";
>>>>>>> bmSidePanelImage = new Bitmap( sImage ); // HERE
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> j
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> "Sergey Bogdanov" <sergey.bogdanov@gmail.com> wrote in message
>>>>>>> news:%23Rw6oxF8FHA.1188@TK2MSFTNGP12.phx.gbl...
>>>>>>>> Did you get the FileNotFoundException? Make sure that:
>>>>>>>>
>>>>>>>> 1. Sidebar.bmp exists in the application's directory
>>>>>>>> 2. Instead of "Sidebar.bmp" use:
>>>>>>>>
>>>>>>>> ------------8<-------------------------------
>>>>>>>> Bitmap bmp = new Bitmap(Path.Combine(AppDir, "Sidebar.bmp"));
>>>>>>>>
>>>>>>>> ...
>>>>>>>>
>>>>>>>> private string AppDir
>>>>>>>> {
>>>>>>>> get
>>>>>>>> {
>>>>>>>> return
>>>>>>>> Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
>>>>>>>> }
>>>>>>>> }
>>>>>>>> ------------8<-------------------------------
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Sergey Bogdanov [.NET CF MVP, MCSD]
>>>>>>>> http://www.sergeybogdanov.com
>>>>>>>>
>>>>>>>>
>>>>>>>> JoeB wrote:
>>>>>>>>> Not much to say really,
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> private static Bitmap bmSidePanelImage;
>>>>>>>>>
>>>>>>>>> :
>>>>>>>>> :
>>>>>>>>>
>>>>>>>>> bmSidePanelImage = new Bitmap( "Sidebar.bmp" );
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> This crashes. I have tried with a png and it again crashes.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Joe
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> "Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in
>>>>>>>>> message news:%23$JdhZE8FHA.1600@TK2MSFTNGP10.phx.gbl...
>>>>>>>>>
>>>>>>>>>>A little bit of code might help us understand....
>>>>>>>>>>
>>>>>>>>>>--
>>>>>>>>>>Chris Tacke
>>>>>>>>>>Co-founder
>>>>>>>>>>OpenNETCF.org
>>>>>>>>>>Are you using the SDF? Let's do a case study.
>>>>>>>>>>Email us at d c s @ o p e n n e t c f . c o m
>>>>>>>>>>http://www.opennetcf.org/donate
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>"JoeB" <joe@sdfdklshj.com> wrote in message
>>>>>>>>>>news:O0EgrKE8FHA.252@TK2MSFTNGP15.phx.gbl...
>>>>>>>>>>
>>>>>>>>>>>Bitmap constructor is causing an exception and the application
>>>>>>>>>>>exits. The is under WinCE5.0, .netCF and deployed with VS2003.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>Anyone else seen and / or solved this problem?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>Joe
>>>>>>>>>>>
>>>&g