Click here to Skip to main content
15,891,253 members
Home / Discussions / C#
   

C#

 
QuestionEvents in C# Interface Pin
skrishnasarma9-May-06 18:44
skrishnasarma9-May-06 18:44 
QuestionEvents in C# Interface Pin
skrishnasarma9-May-06 18:43
skrishnasarma9-May-06 18:43 
AnswerRe: Events in C# Interface Pin
alexey N9-May-06 18:47
alexey N9-May-06 18:47 
GeneralRe: Events in C# Interface Pin
skrishnasarma9-May-06 18:49
skrishnasarma9-May-06 18:49 
GeneralRe: Events in C# Interface Pin
alexey N9-May-06 18:56
alexey N9-May-06 18:56 
GeneralRe: Events in C# Interface Pin
skrishnasarma9-May-06 18:58
skrishnasarma9-May-06 18:58 
GeneralRe: Events in C# Interface Pin
alexey N9-May-06 19:35
alexey N9-May-06 19:35 
QuestionGraphics.PageUnit problem Pin
Super Lloyd9-May-06 18:23
Super Lloyd9-May-06 18:23 
I have to do some WYSIWIG rendering.
Because I need to know exactly where is what and have to have the same output on both the screen and the printer I decided to change my Page unit to Inches.
As I was testing my first thought was to draw red outline of some relevant rectangle.

And here I had my 1st encouter with those infamous Windows strangeness....
Even though I had set my line width to 0, GDI+ draw 1 inch thick rectangles...
What's that?
How could I fix that?

Below is a code sample showing the problem,
just try it: big rectangle:
==========================
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);

e.Graphics.PageUnit = GraphicsUnit.Inch;

using (Pen pen = new Pen(Color.Red, 0))
{
pen.Width = 0;
e.Graphics.DrawRectangle(Pens.Red, 0, 0, 8.5f, 11);
e.Graphics.DrawRectangle(Pens.Red, 1.5f, 1.25f, 5.5f, 8.5f);
}
}



AnswerRe: Graphics.PageUnit problem Pin
Super Lloyd9-May-06 20:00
Super Lloyd9-May-06 20:00 
QuestionInterface Query Pin
Deepasubramanian9-May-06 17:33
Deepasubramanian9-May-06 17:33 
AnswerRe: Interface Query Pin
alexey N9-May-06 17:58
alexey N9-May-06 17:58 
QuestionSudoku? Pin
alwaysaskin?'s9-May-06 17:00
alwaysaskin?'s9-May-06 17:00 
AnswerRe: Sudoku? Pin
led mike9-May-06 17:16
led mike9-May-06 17:16 
AnswerRe: Sudoku? Pin
DigitalKing9-May-06 19:34
DigitalKing9-May-06 19:34 
QuestionCreating Graphical UI Components (Lines, curves, etc.) Pin
StevenS_Dev9-May-06 12:53
StevenS_Dev9-May-06 12:53 
AnswerRe: Creating Graphical UI Components (Lines, curves, etc.) Pin
leppie9-May-06 13:48
leppie9-May-06 13:48 
GeneralRe: Creating Graphical UI Components (Lines, curves, etc.) Pin
StevenS_Dev10-May-06 6:12
StevenS_Dev10-May-06 6:12 
AnswerRe: Creating Graphical UI Components (Lines, curves, etc.) Pin
StevenS_Dev10-May-06 7:06
StevenS_Dev10-May-06 7:06 
QuestionRepainting Pin
clint19829-May-06 11:45
clint19829-May-06 11:45 
AnswerRe: Repainting Pin
Office Lineman9-May-06 11:50
Office Lineman9-May-06 11:50 
GeneralRe: Repainting Pin
clint198210-May-06 3:39
clint198210-May-06 3:39 
QuestionOne ContextMenu for multiple controls?? Pin
student_rhr9-May-06 11:08
student_rhr9-May-06 11:08 
AnswerRe: One ContextMenu for multiple controls?? Pin
Stefan Troschuetz9-May-06 21:43
Stefan Troschuetz9-May-06 21:43 
QuestionConverting and ArrayList into a string Pin
Rizwan Rathore9-May-06 10:40
Rizwan Rathore9-May-06 10:40 
AnswerRe: Converting and ArrayList into a string Pin
Larantz9-May-06 10:54
Larantz9-May-06 10:54 

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.