DRAWIN AT OUT OF BORDER IN VB.NET

  • Thread starter Thread starter saeed rezaei
  • Start date Start date
S

saeed rezaei

HI
when i draw some graphics object in vb.net it's will be draw at my
windows form.
so
how i can draw my graphics object at out of form border. (at my
desktop)

thnks
 
HI
when i draw some graphics object in vb.net it's will be draw at my
windows form.
so
how i can draw my graphics object at out of form border. (at my
desktop)

thnks

In order to draw, you need to have a surface to draw on, such as a
form or control - not the desktop. I'm curious though, what exactly
are you trying to accomplish? If trying to update the user's wallpaper
there are quite a few methods for grabbing the desktop background, and
then modifying the image, and then saving it back.

Thanks,

Seth Rowe
 
thnks rowe
i only want draw some rectangle at out of form border
how can i get sourface from it
 
System.Windows.Forms.DrawReversibleFrame and
DrawReversibleLine will draw directly to the desktop.

If you want to draw other types of rectangles you will
have to look up information about GetDesktopWindow and
the various Win32 GDI drawing functions.

But you better have a good reason for doing so and know
what you are doing.

And you should also make sure you test it on Vista with
the Aero interface enabled. You might find that something
that runs just fine on XP slows to a crawl on Vista/Aero
due to constantly switching back and forth between GDI
and DirectX behind the scenes (or whatever is going on).

Regards,

Joergen Bech
 
Back
Top