Click here to Skip to main content
15,907,392 members
Home / Discussions / C#
   

C#

 
Generalc# code comment web report Pin
Shaun Wilde14-Aug-02 9:06
Shaun Wilde14-Aug-02 9:06 
GeneralRe: c# code comment web report Pin
Eric Gunnerson (msft)14-Aug-02 10:19
Eric Gunnerson (msft)14-Aug-02 10:19 
GeneralRe: c# code comment web report Pin
Shaun Wilde14-Aug-02 22:08
Shaun Wilde14-Aug-02 22:08 
GeneralChanging file permissions Pin
Alex Korchemniy14-Aug-02 6:18
Alex Korchemniy14-Aug-02 6:18 
GeneralRe: Changing file permissions Pin
albean14-Aug-02 6:33
albean14-Aug-02 6:33 
GeneralUpdate Pin
Alex Korchemniy14-Aug-02 6:37
Alex Korchemniy14-Aug-02 6:37 
GeneralRe: Update Pin
albean14-Aug-02 6:49
albean14-Aug-02 6:49 
GeneralRe: Changing file permissions Pin
David Hall15-Aug-02 5:51
professionalDavid Hall15-Aug-02 5:51 
GeneralRe: Changing file permissions Pin
Alex Korchemniy15-Aug-02 9:02
Alex Korchemniy15-Aug-02 9:02 
GeneralDrawing on the Screen Pin
albean14-Aug-02 5:53
albean14-Aug-02 5:53 
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 
Hi,

I read AK's article and experimented with his second solution. It did throw an exception. And I modify it as follow and now it works:

IntPtr hdc = GetDC(IntPtr.Zero); // get hdc for the screen
Graphics g = Graphics.FromHdc(hdc);
g.DrawLine(new Pen(Color.Blue), 0,0,500,500); // draw a line for testing.
g.Dispose(); // <- I don't know if I should use g.Dispose or g.ReleaseHdc here...
ReleaseDC(IntPtr.Zero,hdc);

GetDC & ReleaseDC are Win32 API in user32.dll

Hope this could help youSmile | :)
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 
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 

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.