Changing the Color of a GDI shape
Changing the Color of a GDI shape
Changing the Color of a GDI shape
Changing the Color of a GDI shape
Changing the Color of a GDI shape
Changing the Color of a GDI shape Changing the Color of a GDI shape Changing the Color of a GDI shape Changing the Color of a GDI shape Changing the Color of a GDI shape Changing the Color of a GDI shape Changing the Color of a GDI shape Changing the Color of a GDI shape
Changing the Color of a GDI shape Changing the Color of a GDI shape
Changing the Color of a GDI shape
Go Back  Xtreme Visual Basic Talk > > > Changing the Color of a GDI shape


Reply
 
Thread Tools Display Modes
  #1  
Old 06-19-2006, 01:20 PM
rossatron rossatron is offline
Centurion
 
Join Date: Sep 2003
Posts: 126
Default Changing the Color of a GDI shape


Hey. My questions is this, is it possible, and if so how? to change the color of a region created using GDI+ with for instance a button click? to create the shape im using the following code :

Code:
Dim line As New Rectangle(500, 300, 245, 4) Dim brushes As New System.Drawing.Drawing2D.LinearGradientBrush(line, Color.LightBlue, Color.Transparent, Drawing2D.LinearGradientMode.Horizontal, True) Dim p As New Point(25, 312) Dim p2 As New Point(245, 312) Dim p3 As New Point(245, 314) Dim p4 As New Point(25, 314) Dim pt As Point() = {p, p2, p3, p4} e.Graphics.FillPolygon(brushes, pt)

thanks in advance
Reply With Quote
  #2  
Old 06-21-2006, 12:27 PM
elnerdo's Avatar
elnerdo elnerdo is offline
Contributor
 
Join Date: Jul 2004
Location: Northern New Jersey
Posts: 490
Default

You simply change 'brushes' so that it is a different color, and then you call
e.Graphics.FillPolygon(brushes, pt)
Again.
__________________
nerds unite!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Changing the Color of a GDI shape
Changing the Color of a GDI shape
Changing the Color of a GDI shape Changing the Color of a GDI shape
Changing the Color of a GDI shape
Changing the Color of a GDI shape
Changing the Color of a GDI shape Changing the Color of a GDI shape Changing the Color of a GDI shape Changing the Color of a GDI shape Changing the Color of a GDI shape Changing the Color of a GDI shape Changing the Color of a GDI shape
Changing the Color of a GDI shape
Changing the Color of a GDI shape
 
Changing the Color of a GDI shape
Changing the Color of a GDI shape
 
-->