Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi!

 

I have a program in Visual C++ .net that fills up a triangle with ellipses. I need to be able to change the colors of each ellipse within a loop, calculating different RGB values each time. Any idea on how I can change the brush color using the new RGB values each time? Thanks!!

 

Jenn

  • *Experts*
Posted

I'm not fluent in C++, but (in VB.Net) you would just redefine the brush in your loop:

 

myBrush = New SolidBrush(Color.FromArgb(1, 2, 3))

Member, in good standing, of the elite fraternity of mentally challenged programmers.

 

Dolphins Software

Posted
I'm not fluent in C++, but (in VB.Net) you would just redefine the brush in your loop:

 

myBrush = New SolidBrush(Color.FromArgb(1, 2, 3))

 

 

Thanks! I actually finally figured it out shortly after posting this and it's very similar to what you put above. Thanks for responding though!! :D

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...