How to

convert handle to form

Published: 15. January 2009 | Updated: 26. September 2011
License: Microsoft Public License (MS-PL)
Categories: Framework » Unsafe Code, Winforms
Tags: C# Controls Windows Winforms
Was this snippet helpful for you? YESYES / NONO
Get Analyzant!

Check your entire website from code to content in minutes with Analyzant, the free analysis suite.

Free download at analyzant.com

Import namespace

using System.Windows.Forms;

Code

IntPtr handle = this.Handle;
Form form = Control.FromHandle(handle) as Form;
Send us feedback about this snippet »



Related Snippets: