Click here to Skip to main content
15,920,005 members
Home / Discussions / C#
   

C#

 
GeneralRe: Open Folder Pin
Rahul.RK2-Nov-06 18:41
Rahul.RK2-Nov-06 18:41 
QuestionSpecify comboboxcolumn for bound datatable column Pin
drinkingbird2-Nov-06 16:35
drinkingbird2-Nov-06 16:35 
AnswerRe: Specify comboboxcolumn for bound datatable column Pin
Xint02-Nov-06 16:44
Xint02-Nov-06 16:44 
GeneralRe: Specify comboboxcolumn for bound datatable column [modified] Pin
drinkingbird2-Nov-06 17:22
drinkingbird2-Nov-06 17:22 
GeneralUpdate: Got it Pin
drinkingbird2-Nov-06 18:34
drinkingbird2-Nov-06 18:34 
QuestionAnchor, Dock, FlowLayoutPanel, Panel, When to use and how!? Pin
shultas2-Nov-06 14:09
shultas2-Nov-06 14:09 
AnswerRe: Anchor, Dock, FlowLayoutPanel, Panel, When to use and how!? Pin
Judah Gabriel Himango2-Nov-06 15:40
sponsorJudah Gabriel Himango2-Nov-06 15:40 
QuestionFill a pictureBox with linear gradient Pin
elsombreron2-Nov-06 13:49
elsombreron2-Nov-06 13:49 
Apologies if this is basic but I can't make much sense of most of my searches (and I'm pretty much brand new to C#). I appreciate your help in advance.

Problem:
I have a picturebox (pictureBox1), which I want painted in a blended form from say silver at the top to red at the bottom.
I am aware of something like linear gradient brush but I can't get the syntax right. I get to a point where I write this:

//-----------------------------------------------------------------------
private void pictureBox1_Paint(object sender, PaintEventArgs e)
{
// nothing I try here seems to work!
}
//-----------------------------------------------------------------------

but nothing I try between the brackets seems to work, apart from "pictureBox1.BackColor = Color.Purple(or whatever)", but that's not what I'm after, I can't get a blending working. I know I have to create a brush somehow and tell it to paint it in a blending manner linearly from the starting color to the ending color, but I can't get the syntax right.

Can anyone give me some clues/a hand for/with the syntax? Thanks!

Rodrigo

P.S. Out of curiousity, does anyone know how to create custom shaped buttons?e.g. instead of having the window close button as a square having a button that's a half-moon shape or something. Cheers.
AnswerRe: Fill a pictureBox with linear gradient Pin
Judah Gabriel Himango2-Nov-06 15:36
sponsorJudah Gabriel Himango2-Nov-06 15:36 
AnswerRe: Fill a pictureBox with linear gradient Pin
Alex@UEA2-Nov-06 21:10
Alex@UEA2-Nov-06 21:10 
QuestionWindows Forms Problem Closing From One To Another Pin
Veldor2-Nov-06 13:07
Veldor2-Nov-06 13:07 
AnswerRe: Windows Forms Problem Closing From One To Another Pin
Pradeep C2-Nov-06 13:32
Pradeep C2-Nov-06 13:32 
GeneralRe: Windows Forms Problem Closing From One To Another Pin
Veldor2-Nov-06 13:45
Veldor2-Nov-06 13:45 
GeneralRe: Windows Forms Problem Closing From One To Another Pin
sam#2-Nov-06 17:28
sam#2-Nov-06 17:28 
GeneralRe: Windows Forms Problem Closing From One To Another Pin
Veldor2-Nov-06 20:07
Veldor2-Nov-06 20:07 
QuestionParse a property dynamic Pin
Storme2-Nov-06 10:59
Storme2-Nov-06 10:59 
AnswerRe: Parse a property dynamic Pin
Judah Gabriel Himango2-Nov-06 11:15
sponsorJudah Gabriel Himango2-Nov-06 11:15 
GeneralRe: Parse a property dynamic Pin
Storme2-Nov-06 13:06
Storme2-Nov-06 13:06 
GeneralRe: Parse a property dynamic [modified] Pin
aamironline2-Nov-06 18:45
aamironline2-Nov-06 18:45 
QuestionList property for a custom control, doesn't work in design time Pin
warnov2-Nov-06 9:25
warnov2-Nov-06 9:25 
QuestionWeird ListViewItem ForeColor change Pin
kozu2-Nov-06 9:19
kozu2-Nov-06 9:19 
QuestionMemory usage... Pin
Shy Agam2-Nov-06 9:14
Shy Agam2-Nov-06 9:14 
AnswerRe: Memory usage... Pin
Guffa2-Nov-06 10:10
Guffa2-Nov-06 10:10 
GeneralRe: Memory usage... Pin
Judah Gabriel Himango2-Nov-06 11:07
sponsorJudah Gabriel Himango2-Nov-06 11:07 
GeneralRe: Memory usage... Pin
Paul Conrad2-Nov-06 16:23
professionalPaul Conrad2-Nov-06 16:23 

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.