rss
 
comment(s)

archives
J|F|M|A|M|J|J|A|S|O|N|D
(20##) 10 9 8 7 6 5 4 3 2 1 0 <
 
DesktopWeb FormText   WPF beatingSat, 15 Oct 2005 16:10:29 GMT # 

2 weeks ago, i decided to write a W*F application (WCF, WPF, WWF). came up with an idea and a plan. the first part of the plan was to read a book about each specific W*F technology. cranked through the WCF book with no problem and felt pretty comfortable. read through the WPF book next, and was very much less comfortable. i'm finding it significantly harder than i expected. so i changed plans. the new plan is to ignore WCF and WWF for now, and concentrate on WPF to get my comfort level up. this is the first hour of (attempted) development time

the first thing i need the app to do is get a screen cap. quick google to see if there is some new WinFX way to get a screenshot. that turns up an unanswered question in the newsgroup, so no help. also tried some desktop searches of the samples, still nothing jumped out. vs.net help ... not helpful. ok, so i'll use my old code which uses the System.Drawing namespace and returns a Bitmap. the first thing about the port is that System.Drawing is not an included assembly. the new Bitmap class is BitmapImage in System.Windows.Media.Imaging. except i dont see how i can use that to get a screen shot. also, the old screenshot code uses the System.Windows.Forms.Screen class to get the PrimaryDisplays size. some rummaging around and i dont see how to do the same in WinFX. hell, its not even obvious to me how to force my Window to full screen ... nor do i see a sample that goes full screen. stick with the old code and get it to compile. then i try to bind the Bitmap to the Image control and that wont work. a hack would be to write the Bitmap to a file, or stream it into a BitmapImage class, but i'm not ready to do that ... yet. yep ... i'm pretty much getting my ass kicked