Click here to Skip to main content
15,916,692 members
Home / Discussions / C#
   

C#

 
GeneralRe: Static class info across multiple application instances? Pin
Luc Pattyn19-May-09 2:54
sitebuilderLuc Pattyn19-May-09 2:54 
GeneralRe: Static class info across multiple application instances? Pin
Jacobus0119-May-09 2:59
Jacobus0119-May-09 2:59 
GeneralRe: Static class info across multiple application instances? Pin
ely_bob19-May-09 17:04
professionalely_bob19-May-09 17:04 
GeneralRe: Static class info across multiple application instances? Pin
Luc Pattyn19-May-09 17:09
sitebuilderLuc Pattyn19-May-09 17:09 
AnswerRe: Static class info across multiple application instances? Pin
S. Senthil Kumar19-May-09 3:30
S. Senthil Kumar19-May-09 3:30 
QuestionC# creating custom style combo box Pin
precious roy19-May-09 1:27
precious roy19-May-09 1:27 
GeneralRe: C# creating custom style combo box Pin
OriginalGriff19-May-09 1:56
mveOriginalGriff19-May-09 1:56 
GeneralRe: C# creating custom style combo box Pin
precious roy19-May-09 2:35
precious roy19-May-09 2:35 
ok well here is the code.

Office 2007 Button[^]
i was trying to combine the two and it works half :}

and this is the code i have.

hmm its a bit to long to post here... but here is the draw

internal void onDrawControl(Graphics e)
{
recBounds = this.ClientRectangle;
Rectangle m_BrushSize = new Rectangle(0, 0,
this.Width, this.Height / 2);

for (int i = 0; i <= 40; i++)
{

LinearGradientBrush myLinearGradientBrush1 = new System.Drawing.Drawing2D.LinearGradientBrush(m_BrushSize, Color.FromArgb(i, 255, 253, 235), Color.FromArgb(i, 255, 235, 182),
90);//top item

LinearGradientBrush myLinearGradientBrush = new LinearGradientBrush(m_BrushSize, Color.FromArgb(i, 255, 214, 56), Color.FromArgb(i, 255, 232, 167),
-90);//down item

myLinearGradientBrush.WrapMode = System.Drawing.Drawing2D.WrapMode.TileFlipXY;
myLinearGradientBrush1.WrapMode = System.Drawing.Drawing2D.WrapMode.TileFlipXY;

e.FillRectangle(myLinearGradientBrush, 1, this.Height / 2,
this.Width - 2, this.Height / 2 - 1);//down


e.FillRectangle(myLinearGradientBrush1, 1, 1,
this.Width - 2, this.Height / 2);//top


//Draw Border
Brush brsBorder = new SolidBrush(Color.FromArgb(191, 167, 121));
Pen pnsBorder = new Pen(brsBorder);

Brush brsDot = new SolidBrush(Color.FromArgb(233, 223, 159));
Pen pnsDot = new Pen(brsDot);

e.DrawRectangle(Pens.White, this.ClientRectangle.X + 1, this.ClientRectangle.Y + 1, this.ClientRectangle.Width - 3, this.ClientRectangle.Height - 3);


e.DrawLine(pnsDot, this.ClientRectangle.X, this.ClientRectangle.Y + 1, this.ClientRectangle.X + 1, this.ClientRectangle.Y + 1);
e.DrawLine(pnsDot, this.ClientRectangle.X, this.ClientRectangle.Bottom - 2, this.ClientRectangle.X + 1, this.ClientRectangle.Bottom - 2);
e.DrawLine(pnsDot, this.ClientRectangle.Right - 1, this.ClientRectangle.Bottom - 2, this.ClientRectangle.Right - 2, this.ClientRectangle.Bottom - 2);
e.DrawLine(pnsDot, this.ClientRectangle.Right - 1, this.ClientRectangle.Y + 1, this.ClientRectangle.Right - 2, this.ClientRectangle.Y + 1);


e.DrawLine(pnsBorder, this.ClientRectangle.X + 1, this.ClientRectangle.Y, this.ClientRectangle.Right - 2, this.ClientRectangle.Y);
e.DrawLine(pnsBorder, this.ClientRectangle.X, this.ClientRectangle.Y + 1, this.ClientRectangle.X, this.ClientRectangle.Bottom - 2);
e.DrawLine(pnsBorder, this.ClientRectangle.X + 1, this.ClientRectangle.Bottom - 1, this.ClientRectangle.Right - 2, this.ClientRectangle.Bottom - 1);
e.DrawLine(pnsBorder, this.ClientRectangle.Right - 1, this.ClientRectangle.Y + 1, this.ClientRectangle.Right - 1, this.ClientRectangle.Bottom - 2);

//////////////////////////////////////////////////////////////////end Border

myLinearGradientBrush.Dispose();
myLinearGradientBrush1.Dispose();
brsBorder.Dispose();
brsDot.Dispose();
pnsBorder.Dispose();
pnsDot.Dispose();

}
GeneralRe: C# creating custom style combo box Pin
stancrm19-May-09 3:08
stancrm19-May-09 3:08 
GeneralRe: C# creating custom style combo box Pin
precious roy19-May-09 3:14
precious roy19-May-09 3:14 
QuestionEvent Handlers Pin
Silvyster19-May-09 0:30
Silvyster19-May-09 0:30 
AnswerRe: Event Handlers Pin
OriginalGriff19-May-09 0:56
mveOriginalGriff19-May-09 0:56 
AnswerRe: Event Handlers Pin
Silvyster19-May-09 1:43
Silvyster19-May-09 1:43 
GeneralRe: Event Handlers Pin
OriginalGriff19-May-09 2:00
mveOriginalGriff19-May-09 2:00 
GeneralRe: Event Handlers Pin
Silvyster19-May-09 2:46
Silvyster19-May-09 2:46 
GeneralRe: Event Handlers Pin
DaveyM6919-May-09 2:49
professionalDaveyM6919-May-09 2:49 
Questiondivide incomming internet bandwidth Pin
spiritboy19-May-09 0:11
spiritboy19-May-09 0:11 
AnswerRe: divide incomming internet bandwidth Pin
Nagy Vilmos19-May-09 1:01
professionalNagy Vilmos19-May-09 1:01 
Generaldivide incomming internet bandwidth Pin
spiritboy19-May-09 20:09
spiritboy19-May-09 20:09 
Questionserver-client problem Pin
Malik009219-May-09 0:01
Malik009219-May-09 0:01 
AnswerRe: server-client problem Pin
Michael Bookatz19-May-09 0:40
Michael Bookatz19-May-09 0:40 
AnswerRe: server-client problem Pin
musefan19-May-09 0:47
musefan19-May-09 0:47 
AnswerRe: server-client problem Pin
Nagy Vilmos19-May-09 0:57
professionalNagy Vilmos19-May-09 0:57 
GeneralRe: server-client problem Pin
Malik009219-May-09 1:57
Malik009219-May-09 1:57 
GeneralRe: server-client problem Pin
Luc Pattyn19-May-09 2:32
sitebuilderLuc Pattyn19-May-09 2:32 

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.