Exploring the depths and potentials of ASP.NET RSS 2.0 or Subscribe to .BenRush by Email
 Saturday, January 21, 2006

   Alex has a great blog entry on the NT Object Manager.
kick it on DotNetKicks.com
Saturday, January 21, 2006 10:54:06 AM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback


   .....I'm really a gear head deep down, here are a couple cool downloads I came across for those interested in the Windows Vista kernel:

http://www.microsoft.com/whdc/system/vista/kernel-en.mspx

http://channel9.msdn.com/Shows/Going_Deep


kick it on DotNetKicks.com
Saturday, January 21, 2006 1:45:19 AM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback

 Thursday, January 19, 2006

   ...I'm really behind the times on this, I know, but I'm going to start exploring the Messenger Plus! API from these guys.
kick it on DotNetKicks.com
Thursday, January 19, 2006 11:49:17 AM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback


   http://www.redherring.com/Article.aspx?a=15364&hed=Cingular+Phones+Windows+Mobile
kick it on DotNetKicks.com
Thursday, January 19, 2006 11:36:48 AM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback

 Wednesday, January 18, 2006

if you look back a couple posts you see I got excited about being able to take a snapshot (in bmp form) of a web browser page, well here it is....totally without proper handle closure, exception handling and what-not, here for your entertainment:

mshtml.IHTMLElement iDoc = (mshtml.IHTMLElement)webBrowser1.Document.Body.DomElement;
_IHTMLElementRender iRender = (_IHTMLElementRender)iDoc;

// The 'graphics' object is the dotnet'afied wrapper for the device context with all new, nifty stuff.
// Although this is cool, the functions we'll be using will use the device context directly.
System.Drawing.Graphics gObject = webBrowser1.CreateGraphics();
System.IntPtr dc = gObject.GetHdc(); // get a handle to the underlying device context encapsulated by this object
// take the rendering capability of this object and use it to draw self to the device context (the 'drawing surface').
iRender.DrawToDC( dc);
// The problem is I can't seem to just reach into the data structure of the device
// context and retrieve the bitmap that was drawn there. So, I must get hold of a bitmap
// that is compatible with our device context, add it to a new device context that is compatible
// to the original one, copy the bitmap from the original to the new and, with our handle, reference
// the newly pasted in bitmap (it's actually the same bitmap, just manipulated). We can then
// use this handle to save to disk, etc. I believe that's what's going on, perhaps I'm wrong.


// 1) Take the context of the browser screen and create a new, compatible context for saving our bitmap into.
// CreateCompatibleDC();
System.IntPtr hdc = Native.CreateCompatibleDC(dc);

// 2) Create a bitmap that will work in this context
// CreateCompatibleBitmap():
System.IntPtr hBitmap = Native.CreateCompatibleBitmap(
dc, this.webBrowser1.Width, this.webBrowser1.Height);


// 3) Add the bitmap to the context
// SelectObject();
System.IntPtr hOldObject = Native.SelectObject(
hdc, hBitmap);

// 4) Take the bitmap from the browser and bit-for-bit copy over to the new structure.
// BitBlt();
Native.BitBlt(hdc,
0, 0,
this.webBrowser1.ClientRectangle.Width,
this.webBrowser1.ClientRectangle.Height,
dc,
0, 0,
Native.TernaryRasterOperations.SRCCOPY);

// 5) Take the handle into the new structure we have of our newly created bitmap and do something
// smart with it.
System.Drawing.Bitmap bm = System.Drawing.Image.FromHbitmap(hBitmap);

DialogResult dr = saveFileDialog1.ShowDialog();
if (dr == DialogResult.OK)
{
System.String path = saveFileDialog1.FileName;
bm.Save(path);
}


kick it on DotNetKicks.com
Wednesday, January 18, 2006 11:53:55 PM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback


   http://www.mozilla.org/projects/xul/
kick it on DotNetKicks.com
Wednesday, January 18, 2006 11:47:34 PM (Central Standard Time, UTC-06:00)  #    Comments [1] - Trackback


This is an interesting interface exposed by the webbrowser control; it looks as though it would be feasible (and I found a couple references to the fact that it is) to use this interface to take a snapshot of the content of a browser and save to disk as a bitmap. A lot of potentially neat applications from this...
kick it on DotNetKicks.com
Wednesday, January 18, 2006 12:22:08 AM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback


A friend of mine and I were talking about modern processing technology and he pointed me towards this one by Sun. Very impressive.
kick it on DotNetKicks.com
Wednesday, January 18, 2006 12:01:25 AM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback

Computers Blogs - Blog Top Sites

Archive
<January 2006>
SunMonTueWedThuFriSat
25262728293031
1234567
891011121314
15161718192021
22232425262728
2930311234
Blogroll
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2009
Benjamin Rush
Sign In
Statistics
Total Posts: 444
This Year: 0
This Month: 0
This Week: 0
Comments: 128
Themes
Pick a theme:
All Content © 2009, Benjamin Rush
DasBlog theme 'Business' created by Christoph De Baene (delarou)