Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting pen colours! 1

Status
Not open for further replies.

DimMeAsNewbie

Technical User
Mar 17, 2007
20
GB
How do i enable users to select different colours for a line that i've drawn.
I've got the following code so far for the line, but i want users to be able to change the colour through menustrip.

Dim pen1 As New Pen(Color.Red)
g.DrawLine(pn1,100, 100, x, y)
 
Take a look at the ColorDialog component. You place this on your form, call it when you want the user to select a color, and then set you pen color to the chosen color of the ColorDialog. Give it a shot and let me know if you need some specific help with it.

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB/Access Programmer
 
Thanks mstrmage1768 it's all worked fine.
You're a genious.
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top