![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | 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 Specs![]() |
| | #2 (permalink) |
| Guest | 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 Specs![]() |
| | #3 (permalink) |
| Guest | 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 Specs![]() |
| | #4 (permalink) |
| Guest | 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 Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Power Management no longer allowing me to change display brightnes | Shiroinohi | Vista performance & maintenance | 18 | 05-12-2008 09:16 AM |
| USB no longer working | mrinventions | General Discussion | 0 | 03-01-2008 11:01 AM |
| Fn keys no longer working | computerilliterate | Vista General | 6 | 09-19-2007 10:29 AM |
| wmp and wmc no longer working | snewton62 | Vista music pictures video | 4 | 05-04-2007 03:28 AM |
| USB no longer working | darthsabre | Vista hardware & devices | 1 | 03-09-2007 07:57 PM |