@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: The PaintDesktop API !!!!C# Signature: [DllImport("user32.dll")] static extern bool PaintDesktop(IntPtr hdc); !!!!VB.net Signature: Private Declare Function PaintDesktop Lib "user32.dll" (ByVal HDC As IntPtr) As Boolean !!!!User-Defined Types: None. !!!!Notes: Draws the desktop background to the provided device context. !!!!Tips & Tricks: Please add some! !!!!Sample Code: C# private void Paint(object sender, PaintEventArgs e) { IntPtr HDC = e.Graphics.GetHdc(); //Get the device context PaintDesktop(HDC); //Paint the form with the desktop background e.Graphics.ReleaseHdc(HDC); //Release the device context } !!!!Sample Code: VB.Net Private Sub Paint(sender As Object, e As PaintEventArgs) Dim Hdc As IntPtr = e.Graphics.GetHdc 'Get the device context PaintDesktop(Hdc) 'Paint the form with the desktop background e.Graphics.ReleaseHdc(Hdc) 'Release the device context End Sub !!!!Alternative Managed API: Omnicoder's Managed Windows API: http://www.fileden.com/files/2008/4/5/1852663/ManWinAPI.zip Documentation: PaintDesktop@msdn on MSDN
Edit user32.PaintDesktop
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.