Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
GeneralRe: out variable assignment Pin
George_George15-Jun-08 19:38
George_George15-Jun-08 19:38 
AnswerRe: out variable assignment Pin
leppie15-Jun-08 19:06
leppie15-Jun-08 19:06 
QuestionSend Keys from WebApp to WinForms Pin
willybt8815-Jun-08 12:48
willybt8815-Jun-08 12:48 
AnswerRe: Send Keys from WebApp to WinForms Pin
Christian Graus15-Jun-08 12:58
protectorChristian Graus15-Jun-08 12:58 
Questionsimple regular expression problem Pin
Stephen Po15-Jun-08 11:55
Stephen Po15-Jun-08 11:55 
AnswerRe: simple regular expression problem Pin
Christian Graus15-Jun-08 12:09
protectorChristian Graus15-Jun-08 12:09 
QuestionProblem to Send Message to other Clients via MSMQ [modified] Pin
hdv21215-Jun-08 11:15
hdv21215-Jun-08 11:15 
QuestionGraphicsPath remove or alter line Pin
Chris Copeland15-Jun-08 11:13
mveChris Copeland15-Jun-08 11:13 
Hey.

I've been trying to get this to work but with no avail. I'm trying to modify a GraphicsPath to remove a line or move it so it matches the situation i'm using.

I'm using it as part of a new Rendering mode (for the ToolStripManager.Renderer), and i've got a code that creates a path (and adds curves to the corners if I want it to).

My code gets the GraphicsPath of the AffectedArea of a MenuStrip dropdown (or ToolStripDropDownButton). I want the code to remove or alter the line to leave a space for the ConnectedArea section.

Here's a picture of the area, I mean, that I want to be able to remove (opens in new window)

The black border is the GraphicsPath lines that the code retrieves. The red part is the part of the line I want to remove.

Here's a sample of the code inside OnRenderToolStripBorder(ToolStripRenderEventArgs e)

if (e.ToolStrip is ContextMenuStrip || e.ToolStrip is ToolStripDropDownMenu)
{
	Rectangle Area = new Rectangle(0, 0, e.AffectedBounds.Width - 1, e.AffectedBounds.Height - 1);

	e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;

	using (GraphicsPath Path = CreateDrawingPath(Area, 0))
	{
		e.Graphics.DrawPath(Pens.Black, Path);
	}
}


I've tried using:

Path.PathPoints[0] = new PointF(e.ConnectedArea.Width, 0);


To try and change the first point of the GraphicsPath to start from the X axis of the width of the ConnectedArea (the GraphicsPath goes "Left-top" -> "Right-top", "Right-top" -> "Right-bottom" etc).

But it doesn't work. Does anyone have an idea how I might be able to move the first point to where the ConnectedArea Width ends?

Thanks in advance Smile | :)
QuestionConverting a project to .Net 3 Pin
Muammar©15-Jun-08 9:28
Muammar©15-Jun-08 9:28 
AnswerRe: Converting a project to .Net 3 Pin
Christian Graus15-Jun-08 9:32
protectorChristian Graus15-Jun-08 9:32 
GeneralRe: Converting a project to .Net 3 Pin
Muammar©15-Jun-08 9:37
Muammar©15-Jun-08 9:37 
GeneralRe: Converting a project to .Net 3 Pin
Christian Graus15-Jun-08 9:43
protectorChristian Graus15-Jun-08 9:43 
GeneralRe: Converting a project to .Net 3 Pin
Muammar©15-Jun-08 9:49
Muammar©15-Jun-08 9:49 
GeneralRe: Converting a project to .Net 3 Pin
Christian Graus15-Jun-08 9:52
protectorChristian Graus15-Jun-08 9:52 
GeneralRe: Converting a project to .Net 3 Pin
Muammar©15-Jun-08 9:53
Muammar©15-Jun-08 9:53 
GeneralRe: Converting a project to .Net 3 Pin
Christian Graus15-Jun-08 9:54
protectorChristian Graus15-Jun-08 9:54 
GeneralRe: Converting a project to .Net 3 Pin
Muammar©15-Jun-08 9:55
Muammar©15-Jun-08 9:55 
Questiontotal minutes difference Pin
Jassim Rahma15-Jun-08 8:24
Jassim Rahma15-Jun-08 8:24 
AnswerRe: total minutes difference Pin
User 665815-Jun-08 8:35
User 665815-Jun-08 8:35 
AnswerRe: total minutes difference [modified] Pin
Eslam Afifi15-Jun-08 8:37
Eslam Afifi15-Jun-08 8:37 
AnswerRe: total minutes difference Pin
Pete O'Hanlon15-Jun-08 8:39
mvePete O'Hanlon15-Jun-08 8:39 
Questionround the fils Pin
Jassim Rahma15-Jun-08 8:18
Jassim Rahma15-Jun-08 8:18 
AnswerRe: round the fils Pin
Eslam Afifi15-Jun-08 8:49
Eslam Afifi15-Jun-08 8:49 
Questionsize of an object of a class Pin
tina->newcoder15-Jun-08 7:54
tina->newcoder15-Jun-08 7:54 
AnswerRe: size of an object of a class Pin
Eslam Afifi15-Jun-08 9:22
Eslam Afifi15-Jun-08 9: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.