Re: Control.DrawToBitmap and Restrictions

Tech-Archive recommends: Fix windows errors by optimizing your registry



<powella@xxxxxxxxx> schrieb:
I've recently discovered the DrawToBitmap method hidden away in the
Control class (in .NET 2.0). What a fantastic addition to the class.

I am curious what doesn't work...

\\\
Private Function CreateScreenshot( _
   ByVal Control As Control _
) As Bitmap
   Dim Screenshot As New Bitmap(Control.Width, Control.Height)
   Control.DrawToBitmap( _
       Screenshot, _
       New Rectangle(0, 0, Control.Width, Control.Height) _
   )
   Return Screenshot
End Function
///

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
.



Relevant Pages

  • Re: Running IDE as a standard user in Vista
    ... the IDE. ... Class ComctlLib.StatusBar of control sBar was not a loaded ... control class. ... loaded control class. ...
    (microsoft.public.vb.general.discussion)
  • Re: newbie: stuck on trying to modify a control porerty from within created thread. Pls some help.
    ... It doesn't matter where the method trying to modify the control is declared ... what is important is the thread executing that ... event is hooked by the control class. ... > You need to call BeginInvoke method of the delegate from the thread. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: CMonthCalendarCtrl problem
    ... Load animate control class. ... Load toolbar, status bar, trackbar, and ToolTip control classes. ...
    (microsoft.public.vc.atl)
  • User Control without Visual Studio
    ... Im trying to get a user control working in mono/ASP.NET. ... it declaratively in a hosting page's .aspx file. ... your control class for you and add's whatever is needed in your hosting ... compiler will recognize my class type and let me access it ...
    (microsoft.public.dotnet.framework.aspnet)
  • ASP.NET User Controls - missing something small?
    ... Im trying to get a user control working in mono/ASP.NET. ... it declaratively in a hosting page's .aspx file. ... your control class for you and add's whatever is needed in your hosting ... compiler will recognize my class type and let me access it ...
    (microsoft.public.dotnet.framework.aspnet)