Blog Stats
  • Posts - 94
  • Articles - 0
  • Comments - 10
  • Trackbacks - 0

 

November 2009 Entries

November 2009 IT Toolbox Column for TechNet Magazine

The November 2009 issue of TechNet Magazine is out on the website. Check out my IT Toolbox column here: November 2009 TechNet Magazine IT Toolbox In this issue I covered: BeyondCompare 3: Compare, Merge And Synchronize Files And Folders WhatIsMyIp.com: Get IP Details; Test Connection Speed ADRecycleBin: Find and Restore Deleted AD Objects Check it out and let me know what you think! And if you have a tool you want to see me review, please suggest it to me here: tntools@microsoft.com. Also, as some of you know, this was the last print issue of TechNet...

Retrieve Image from Windows Clipboard via .Net C#

If you want to snag clipboard data from a different application into the context of your running .Net application, here's how you can do it:         private static Image _clipBoardImage = null;         private static Image GetImageFromCopyPasteBuffer()         {             Thread t = new Thread(new ThreadStart(GetClipboardBitmap));             t.SetApartmentState(ApartmentState.STA);             t.Start();             t.Join();             return _clipBoardImage;         }         private static void GetClipboardBitmap()         {             IDataObject data = Clipboard.GetDataObject();             if (data == null || !data.GetDataPresent(DataFormats.Bitmap, true))                 throw new ApplicationException("No clipboard image data was present.");             _clipBoardImage = (Image)data.GetData(DataFormats.Bitmap);         }   Hope this helps!  

 

 

Copyright © Greg Steen