Click here to Skip to main content
15,890,123 members
Home / Discussions / C#
   

C#

 
AnswerRe: Blocking Multiple Application accessing the same file Pin
Colin Angus Mackay25-Apr-07 4:47
Colin Angus Mackay25-Apr-07 4:47 
AnswerRe: Blocking Multiple Application accessing the same file Pin
Tim Paaschen25-Apr-07 19:50
Tim Paaschen25-Apr-07 19:50 
QuestionContextMenu and ListView problem? Pin
Khoramdin25-Apr-07 4:25
Khoramdin25-Apr-07 4:25 
AnswerRe: ContextMenu and ListView problem? Pin
led mike25-Apr-07 4:33
led mike25-Apr-07 4:33 
QuestionSorting DataGrid when datasource is a DataSet Pin
Chris_Green25-Apr-07 3:35
Chris_Green25-Apr-07 3:35 
AnswerRe: Sorting DataGrid when datasource is a DataSet Pin
kubben25-Apr-07 5:38
kubben25-Apr-07 5:38 
GeneralRe: Sorting DataGrid when datasource is a DataSet Pin
Chris_Green25-Apr-07 5:42
Chris_Green25-Apr-07 5:42 
QuestionCreate a Better looking panel? Pin
Carlos Adriano Portes25-Apr-07 3:16
professionalCarlos Adriano Portes25-Apr-07 3:16 
Hi
My UserControl does not look properly, I would like very much someone to help me adjusting it, it only paints well when it is a perfect rectangle otherwise it does not! I would like a panel with this look but when resized displays perfect as well

Here is the code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
using System.Drawing.Extended;

namespace Teste17
{
public partial class UserControl5 : UserControl
{
public UserControl5()
{
InitializeComponent();
}

private void UserControl5_Paint(object sender, PaintEventArgs e)
{
LinearGradientBrush linearGradientBrush = new LinearGradientBrush(this.ClientRectangle, Color.Black, Color.Black, 45, false);
ColorBlend colorBlend = new ColorBlend();
colorBlend.Positions = new float[4];
colorBlend.Positions[0] = 0.00f;
colorBlend.Positions[1] = 0.49f;
colorBlend.Positions[2] = 0.51f;
colorBlend.Positions[3] = 1.00f;
colorBlend.Colors = new Color[4];
colorBlend.Colors[0] = Color.FromKnownColor(KnownColor.Window);
colorBlend.Colors[1] = Color.FromKnownColor(KnownColor.Window);
colorBlend.Colors[2] = Color.FromKnownColor(KnownColor.ControlDark);
colorBlend.Colors[3] = Color.FromKnownColor(KnownColor.ControlDark);
linearGradientBrush.InterpolationColors = colorBlend;
e.Graphics.SmoothingMode = SmoothingMode.HighQuality;
ExtendedGraphics extendedGraphics = new ExtendedGraphics(e.Graphics);
Pen pen = new Pen(linearGradientBrush);
extendedGraphics.DrawRoundRectangle(pen, 0, 0, this.Width - 1, this.Height - 1, 5);
}
}
}

The code of using System.Drawing.Extended; is from a friend here in codeproject which name I cannot remenber at the moment...
AnswerRe: Create a Better looking panel? Pin
Patrick Etc.25-Apr-07 4:16
Patrick Etc.25-Apr-07 4:16 
QuestionApplication error question Pin
LCI25-Apr-07 2:53
LCI25-Apr-07 2:53 
AnswerRe: Application error question Pin
Tarakeshwar Reddy25-Apr-07 4:37
professionalTarakeshwar Reddy25-Apr-07 4:37 
QuestionProperties not displayed in Visual Studio Editor Pin
SakthiSurya25-Apr-07 1:56
SakthiSurya25-Apr-07 1:56 
AnswerRe: Properties not displayed in Visual Studio Editor Pin
Christian Graus25-Apr-07 2:14
protectorChristian Graus25-Apr-07 2:14 
GeneralRe: Properties not displayed in Visual Studio Editor Pin
SakthiSurya25-Apr-07 2:27
SakthiSurya25-Apr-07 2:27 
GeneralRe: Properties not displayed in Visual Studio Editor Pin
marky77725-Apr-07 4:14
marky77725-Apr-07 4:14 
GeneralRe: Properties not displayed in Visual Studio Editor Pin
SakthiSurya25-Apr-07 21:35
SakthiSurya25-Apr-07 21:35 
GeneralRe: Properties not displayed in Visual Studio Editor Pin
marky77725-Apr-07 21:42
marky77725-Apr-07 21:42 
AnswerRe: Properties not displayed in Visual Studio Editor Pin
Amr Abdel-Mohsen25-Apr-07 2:25
Amr Abdel-Mohsen25-Apr-07 2:25 
Questionhow to pass a method with parameter(s) to ThreadStart ? Pin
hdv21225-Apr-07 1:36
hdv21225-Apr-07 1:36 
AnswerRe: how to pass a method with parameter(s) to ThreadStart ? Pin
Martin#25-Apr-07 2:07
Martin#25-Apr-07 2:07 
AnswerRe: how to pass a method with parameter(s) to ThreadStart ? Pin
Christian Graus25-Apr-07 2:15
protectorChristian Graus25-Apr-07 2:15 
GeneralRe: how to pass a method with parameter(s) to ThreadStart ? Pin
Martin#25-Apr-07 2:22
Martin#25-Apr-07 2:22 
AnswerRe: how to pass a method with parameter(s) to ThreadStart ? Pin
Amr Abdel-Mohsen25-Apr-07 2:30
Amr Abdel-Mohsen25-Apr-07 2:30 
AnswerRe: how to pass a method with parameter(s) to ThreadStart ? Pin
Jimmanuel25-Apr-07 3:22
Jimmanuel25-Apr-07 3:22 
QuestionArray of Tab Pages problem Pin
MicealG25-Apr-07 1:31
MicealG25-Apr-07 1:31 

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.