Click here to Skip to main content
16,007,885 members
Home / Discussions / C#
   

C#

 
GeneralMSDASC.DataLinks PromptNew() Pin
inyoursadachine3-Jun-04 16:44
inyoursadachine3-Jun-04 16:44 
GeneralRe: MSDASC.DataLinks PromptNew() Pin
Heath Stewart3-Jun-04 18:28
protectorHeath Stewart3-Jun-04 18:28 
GeneralRe: MSDASC.DataLinks PromptNew() Pin
inyoursadachine3-Jun-04 18:44
inyoursadachine3-Jun-04 18:44 
GeneralControll Scrolling Programactically Pin
TaoLi3-Jun-04 16:36
TaoLi3-Jun-04 16:36 
GeneralRe: Controll Scrolling Programactically Pin
Heath Stewart3-Jun-04 17:51
protectorHeath Stewart3-Jun-04 17:51 
QuestionNotifyIcon app: how to show the context menu? Pin
wangdave3-Jun-04 15:56
wangdave3-Jun-04 15:56 
AnswerRe: NotifyIcon app: how to show the context menu? Pin
Heath Stewart3-Jun-04 17:46
protectorHeath Stewart3-Jun-04 17:46 
QuestionDrawing in different ways ??? Pin
sachinkalse3-Jun-04 15:21
sachinkalse3-Jun-04 15:21 
Please read the code snippets below

snippet 1: Drawing rectangle using Device Context
-------------------------------------------------------------[System.Runtime.InteropServices.DllImportAttribute("gdi32.dll")]
private static extern bool Rectangle(
IntPtr hdc,
int ulCornerX, int ulCornerY,
int lrCornerX, int lrCornerY);
public void GetHdcForGDI(PaintEventArgs e)
{
// Create pen.
Pen redPen = new Pen(Color.Red, 1);
// Draw rectangle with GDI+.
e.Graphics.DrawRectangle(redPen, 10, 10, 100, 50);
// Get handle to device context.
IntPtr hdc = new IntPtr();
hdc = e.Graphics.GetHdc();
// Draw rectangle with GDI using default pen.
Rectangle(hdc, 10, 70, 110, 120);
// Release handle to device context.
e.Graphics.ReleaseHdc(hdc);
}
-------------------------------------------------------------

snippet 2: Drawing rectangle using PrintPageEvntArgs
-------------------------------------------------------------
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
Pen redPen = new Pen(Color.Red, 1);
e.Graphics.DrawRectangle(redPen, 100, 100, 100, 100);
}
-------------------------------------------------------------

Please explain what is difference between drawing rectangle using Device Context and PrintPageEvntArgs in terms of the concept and merits

regards Roll eyes | :rolleyes:
AnswerRe: Drawing in different ways ??? Pin
Heath Stewart3-Jun-04 17:39
protectorHeath Stewart3-Jun-04 17:39 
GeneralNice antialiased icons Pin
XanderSon3-Jun-04 14:38
XanderSon3-Jun-04 14:38 
GeneralRe: Nice antialiased icons Pin
Heath Stewart3-Jun-04 17:16
protectorHeath Stewart3-Jun-04 17:16 
GeneralRe: Nice antialiased icons Pin
leppie4-Jun-04 7:20
leppie4-Jun-04 7:20 
GeneralRe: Nice antialiased icons Pin
Heath Stewart4-Jun-04 9:24
protectorHeath Stewart4-Jun-04 9:24 
GeneralRe: Nice antialiased icons Pin
leppie4-Jun-04 10:10
leppie4-Jun-04 10:10 
GeneralRe: Nice antialiased icons Pin
Heath Stewart4-Jun-04 10:12
protectorHeath Stewart4-Jun-04 10:12 
GeneralRe: Nice antialiased icons Pin
XanderSon4-Jun-04 12:57
XanderSon4-Jun-04 12:57 
GeneralRe: Nice antialiased icons Pin
Heath Stewart4-Jun-04 13:32
protectorHeath Stewart4-Jun-04 13:32 
GeneralEscape characters and regex Pin
cardboard423-Jun-04 14:34
cardboard423-Jun-04 14:34 
GeneralRe: Escape characters and regex Pin
Heath Stewart3-Jun-04 17:10
protectorHeath Stewart3-Jun-04 17:10 
GeneralRe: Escape characters and regex Pin
leppie4-Jun-04 10:44
leppie4-Jun-04 10:44 
GeneralGetting a - "Cannot implicitly convert type 'int' to 'byte'" error - Help! Pin
link_793-Jun-04 12:51
link_793-Jun-04 12:51 
GeneralRe: Getting a - "Cannot implicitly convert type 'int' to 'byte'" error - Help! Pin
Andrew McCarter3-Jun-04 13:29
Andrew McCarter3-Jun-04 13:29 
GeneralRe: Getting a - "Cannot implicitly convert type 'int' to 'byte'" error - Help! Pin
link_793-Jun-04 13:34
link_793-Jun-04 13:34 
GeneralRe: Getting a - "Cannot implicitly convert type 'int' to 'byte'" error - Help! Pin
leppie4-Jun-04 7:25
leppie4-Jun-04 7:25 
GeneralNew to Programming/C# Pin
tweakk3-Jun-04 11:22
tweakk3-Jun-04 11:22 

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.