Category Archives: WinForms

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 … Continue reading

Posted in C#, WinForms | Leave a comment

ASP.Net WebServices: Enabling or Disabling POST, GET, and Documentation Requests

It is relatively easy to control access to the various HTTP request types (protocols) for your ASP.Net WebService. Add something like this to the system.web section of your web.config: [ccie_html lang=”xml”]   [/ccie_html] Of course you will want to tailor … Continue reading

Posted in C#, Web Services, WinForms | Leave a comment

A Program Window Restores Down to Just the Title Bar

Yeah, this really has nothing to do with programming, but wow, was this annoying.  Some how, Outlook shrunk itself down to just the title bar and I couldn’t find a way to restore it to a useful size (it was … Continue reading

Posted in Microsoft Office, WinForms | Leave a comment

WinForm Exception Catching

Here’s a general way to catch most outside exceptions in your WinForm code.  Add this to your program wrapper:   Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);   AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); Of course, it is always better to handle specific cases with … Continue reading

Posted in C#, WinForms | Leave a comment