Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Change in rc1, code no longer working

 
 
Old 10-04-2006   #1 (permalink)
Griff


 
 

Change in rc1, code no longer working

I found another bit of simple code that worked in Beta 2 but not in rc1


c#

public partial class Window1 : System.Windows.Window
{
public Window1()
{
InitializeComponent();
Image im = new Image();
String filePath = @"c:\Program Files\Icons\sketch.JPG";
im.Source = (ImageSource)((new
ImageSourceConverter()).ConvertFromString(filePath));
MyGrid.Children.Add(im);
}
}

Whereas before this worked OK, it now causes Win32 Exception, but not when
the code above actually runs. It is specifically when the Image (or
something containing it) is first made visible and it gets rendered.

Any suggestions anyone ?



--
Griff
(trying to make an industrial UI with XAML/WPF/c#)

My System SpecsSystem Spec
Old 10-04-2006   #2 (permalink)
Douglas Stockwell


 
 

Re: Change in rc1, code no longer working

I can't seem to reproduce that. It doesn't raise an exception for me.

- Doug

"Griff" <Griff@discussions.microsoft.com> wrote in message
news:13262D20-D5C4-4233-BDE8-4A8D0B2060A7@microsoft.com...
>I found another bit of simple code that worked in Beta 2 but not in rc1
>
>
> c#
>
> public partial class Window1 : System.Windows.Window
> {
> public Window1()
> {
> InitializeComponent();
> Image im = new Image();
> String filePath = @"c:\Program Files\Icons\sketch.JPG";
> im.Source = (ImageSource)((new
> ImageSourceConverter()).ConvertFromString(filePath));
> MyGrid.Children.Add(im);
> }
> }
>
> Whereas before this worked OK, it now causes Win32 Exception, but not when
> the code above actually runs. It is specifically when the Image (or
> something containing it) is first made visible and it gets rendered.
>
> Any suggestions anyone ?
>
>
>
> --
> Griff
> (trying to make an industrial UI with XAML/WPF/c#)


My System SpecsSystem Spec
Old 10-05-2006   #3 (permalink)
Griff


 
 

Re: Change in rc1, code no longer working

I guess your installation must be different to mine then.

Maybe mine's not "clean"...

Are there any known issues with installing rc1 after previous versions ? I
did a control panels uninstall of all the WinFX components from Beta 2, then
installed 3.0 from scratch.

When I drill right down with debugger I end up with a write to unauthorised
memory somewhere in a DLL called something like WindowsCodecs.

Any suggestions as to where to look ?


--
Griff
(trying to make an industrial UI with XAML/WPF/c#)


"Douglas Stockwell" wrote:

> I can't seem to reproduce that. It doesn't raise an exception for me.
>
> - Doug
>
> "Griff" <Griff@discussions.microsoft.com> wrote in message
> news:13262D20-D5C4-4233-BDE8-4A8D0B2060A7@microsoft.com...
> >I found another bit of simple code that worked in Beta 2 but not in rc1
> >
> >
> > c#
> >
> > public partial class Window1 : System.Windows.Window
> > {
> > public Window1()
> > {
> > InitializeComponent();
> > Image im = new Image();
> > String filePath = @"c:\Program Files\Icons\sketch.JPG";
> > im.Source = (ImageSource)((new
> > ImageSourceConverter()).ConvertFromString(filePath));
> > MyGrid.Children.Add(im);
> > }
> > }
> >
> > Whereas before this worked OK, it now causes Win32 Exception, but not when
> > the code above actually runs. It is specifically when the Image (or
> > something containing it) is first made visible and it gets rendered.
> >
> > Any suggestions anyone ?
> >
> >
> >
> > --
> > Griff
> > (trying to make an industrial UI with XAML/WPF/c#)

>

My System SpecsSystem Spec
Old 10-05-2006   #4 (permalink)
Griff


 
 

Re: Change in rc1, code no longer working

Thanks to Doug's hint that it was my installation at fault, I found and fixed
the problem.

My WIC (Windows Imaging Component) files and somehow ended up as the wrong
version with all the CTP's I'd had installed.

Found Robert A. Wlodarczyk's Blog (MSFT) with the fix outlined.
http://blogs.msdn.com/rwlodarc/archi...25/607131.aspx

(It refers to beta 2 but the same fix works for 3.0 rc1).

All working again.


--
Griff
(trying to make an industrial UI with XAML/WPF/c#)


"Griff" wrote:

> I guess your installation must be different to mine then.
>
> Maybe mine's not "clean"...
>
> Are there any known issues with installing rc1 after previous versions ? I
> did a control panels uninstall of all the WinFX components from Beta 2, then
> installed 3.0 from scratch.
>
> When I drill right down with debugger I end up with a write to unauthorised
> memory somewhere in a DLL called something like WindowsCodecs.
>
> Any suggestions as to where to look ?
>
>
> --
> Griff
> (trying to make an industrial UI with XAML/WPF/c#)
>
>
> "Douglas Stockwell" wrote:
>
> > I can't seem to reproduce that. It doesn't raise an exception for me.
> >
> > - Doug
> >
> > "Griff" <Griff@discussions.microsoft.com> wrote in message
> > news:13262D20-D5C4-4233-BDE8-4A8D0B2060A7@microsoft.com...
> > >I found another bit of simple code that worked in Beta 2 but not in rc1
> > >
> > >
> > > c#
> > >
> > > public partial class Window1 : System.Windows.Window
> > > {
> > > public Window1()
> > > {
> > > InitializeComponent();
> > > Image im = new Image();
> > > String filePath = @"c:\Program Files\Icons\sketch.JPG";
> > > im.Source = (ImageSource)((new
> > > ImageSourceConverter()).ConvertFromString(filePath));
> > > MyGrid.Children.Add(im);
> > > }
> > > }
> > >
> > > Whereas before this worked OK, it now causes Win32 Exception, but not when
> > > the code above actually runs. It is specifically when the Image (or
> > > something containing it) is first made visible and it gets rendered.
> > >
> > > Any suggestions anyone ?
> > >
> > >
> > >
> > > --
> > > Griff
> > > (trying to make an industrial UI with XAML/WPF/c#)

> >

My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Power Management no longer allowing me to change display brightnes Vista performance & maintenance
USB no longer working General Discussion
Dreamscene no longer working Vista General
wmp and wmc no longer working Vista music pictures video
USB no longer working Vista hardware & devices


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46