Click here to Skip to main content
15,924,935 members
Home / Discussions / C#
   

C#

 
GeneralRe: Drawing on the Screen Pin
Anonymous14-Aug-02 6:04
Anonymous14-Aug-02 6:04 
GeneralRe: Drawing on the Screen Pin
albean14-Aug-02 6:13
albean14-Aug-02 6:13 
GeneralRe: Drawing on the Screen Pin
Alex Korchemniy14-Aug-02 6:28
Alex Korchemniy14-Aug-02 6:28 
GeneralRe: Drawing on the Screen Pin
Alex Korchemniy14-Aug-02 6:42
Alex Korchemniy14-Aug-02 6:42 
GeneralRe: Drawing on the Screen Pin
albean14-Aug-02 7:13
albean14-Aug-02 7:13 
GeneralRe: Drawing on the Screen Pin
Li-kai Liu (Angus)15-Aug-02 3:12
Li-kai Liu (Angus)15-Aug-02 3:12 
GeneralRe: Drawing on the Screen Pin
Alex Korchemniy15-Aug-02 9:05
Alex Korchemniy15-Aug-02 9:05 
GeneralRe: Drawing on the Screen Pin
James T. Johnson14-Aug-02 7:51
James T. Johnson14-Aug-02 7:51 
I've never tried this, so it may or may not work but here goes Smile | :)

Create a control the same size as the Form (a panel would do), now when you want to draw your grid or whatever above the Form you do several things....

form will be the Form you are trying to draw on top of
parent will be the panel or whatever that the Form is sitting on top of

<br />
Graphics g = parent.CreateGraphics();<br />
PaintEventArgs e = new PaintEventArgs(e, form.Bounds);<br />
<br />
InvokePaint(form, e); <br />
// At this point the form has painted itself <br />
// to the graphics object<br />
<br />
// Do your drawing here using the Graphics object, g<br />


James
"And we are all men; apart from the females." - Colin Davies
GeneralRe: Drawing on the Screen Pin
albean14-Aug-02 8:32
albean14-Aug-02 8:32 
GeneralRe: Drawing on the Screen Pin
James T. Johnson14-Aug-02 8:58
James T. Johnson14-Aug-02 8:58 
GeneralRe: Drawing on the Screen Pin
albean15-Aug-02 16:40
albean15-Aug-02 16:40 
GeneralLooking for attribute Pin
leppie14-Aug-02 4:54
leppie14-Aug-02 4:54 
GeneralRe: Looking for attribute Pin
James T. Johnson14-Aug-02 5:00
James T. Johnson14-Aug-02 5:00 
GeneralRe: Looking for attribute Pin
leppie14-Aug-02 6:04
leppie14-Aug-02 6:04 
GeneralRe: Looking for attribute Pin
James T. Johnson14-Aug-02 6:16
James T. Johnson14-Aug-02 6:16 
GeneralRe: Looking for attribute Pin
Nnamdi Onyeyiri14-Aug-02 7:22
Nnamdi Onyeyiri14-Aug-02 7:22 
GeneralRe: Looking for attribute Pin
David Stone14-Aug-02 5:58
sitebuilderDavid Stone14-Aug-02 5:58 
GeneralRe: Looking for attribute Pin
albean14-Aug-02 6:03
albean14-Aug-02 6:03 
GeneralRe: Looking for attribute Pin
leppie14-Aug-02 6:09
leppie14-Aug-02 6:09 
GeneralRe: Looking for attribute Pin
Andy Smith14-Aug-02 6:30
Andy Smith14-Aug-02 6:30 
GeneralRe: Looking for attribute Pin
leppie14-Aug-02 6:53
leppie14-Aug-02 6:53 
GeneralSuperclassing, WndProc, CreateParams, etc Pin
psatvz14-Aug-02 4:43
psatvz14-Aug-02 4:43 
GeneralRe: Superclassing, WndProc, CreateParams, etc Pin
TigerNinja_15-Aug-02 19:13
TigerNinja_15-Aug-02 19:13 
QuestionWhy does the compiler #$%#$%? Pin
leppie14-Aug-02 1:09
leppie14-Aug-02 1:09 
AnswerSOLVED Pin
leppie14-Aug-02 1:24
leppie14-Aug-02 1:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.