PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms How to paint off the form?

Reply

How to paint off the form?

 
Thread Tools Rate Thread
Old 14-12-2005, 03:22 PM   #1
Tomas Machala
Guest
 
Posts: n/a
Default How to paint off the form?


Hi,
Is there a way how to paint some lines via GDI to some place on the screen,
even off the application form?
Also, how do I make that lines 'topmost' to be uncoverable by any other
application?


  Reply With Quote
Old 14-12-2005, 10:22 PM   #2
Stoitcho Goutsev \(100\) [C# MVP]
Guest
 
Posts: n/a
Default Re: How to paint off the form?

Tomas,

> Hi,
> Is there a way how to paint some lines via GDI to some place on the
> screen, even off the application form?


Normally applications have limit their drawing to there own client area. It
is possible to obtain HDC to the entire screen and then attached to a
Graphics object and draw all over the screen, but this involves uing PInvoke
and inmanaged API (look at GetDCEx)

You can also use ControlPaint class and its methods DrawReversibleLine and
FillReversibleRectangle to draw on the screen, but this is as much as you
can get from managed code.

> Also, how do I make that lines 'topmost' to be uncoverable by any other
> application?


To make the form staying on the top of all normal windows set form's TopMost
to *true*. It places the form over all windows that are not top most. If two
top most widnows are on the floor the active one is obove the inactive.
There is no way you can set a form that stays over all other windows.
Internesting what would happen if two such forms are shown at the same time.


--

Stoitcho Goutsev (100) [C# MVP]

"Tomas Machala" <t.machala@tiscali.cz> wrote in message
news:ef1v4IMAGHA.740@TK2MSFTNGP12.phx.gbl...
> Hi,
> Is there a way how to paint some lines via GDI to some place on the
> screen, even off the application form?
> Also, how do I make that lines 'topmost' to be uncoverable by any other
> application?
>



  Reply With Quote
Old 15-12-2005, 01:48 PM   #3
Tomas Machala
Guest
 
Posts: n/a
Default Re: How to paint off the form?

Thanks, that helped me a lot.

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off