Wrox Programmer Forums
|
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 30th, 2004, 02:56 AM
Registered User
 
Join Date: Jan 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using Color Palette

Hi,

I am working on a Windows Form using VB.Net wherein I require to give the user an option to select a color from a color Palette and after the color is selected by the user , the color code of the selected color gets stored in the database. Can anyone suggest how to incorporate a color palette in a form and the related coding tips.


Cheers,
Monica



 
Old January 30th, 2004, 05:04 AM
Authorized User
 
Join Date: Jun 2003
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Monica

In VB there is a color dialog box that works like all the other dialog boxes. you should be able to retrieve the selected color once the user has selected a color and store this value in the database. the value is more likely to be in hexidecimal format, though this could be converted if required.

Hop this helps


Duncan
 
Old January 30th, 2004, 05:09 AM
Registered User
 
Join Date: Jan 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Monica,

if you need source, here you go

1) open windows form in vb.net
2) add colordiaglog control from the toolbar
3) add following script in the form

ColorDialog1.Color = TextBox1.BackColor
ColorDialog1.AllowFullOpen = True
ColorDialog1.ShowDialog()
TextBox1.BackColor = ColorDialog1.Color

4) so you should be able to select color and store it in the database
5) after following above steps, if you get errors let me know

good luck

 
Old January 30th, 2004, 06:06 AM
Registered User
 
Join Date: Jan 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanx guys..it helped!






Similar Threads
Thread Thread Starter Forum Replies Last Post
Color printing designbot BOOK Beginning CSS: Cascading Style Sheets for Web Design, 2nd Ed; ISBN: 978-0-470-09697-0 2 July 5th, 2007 12:21 PM
textbox color Candyd Access VBA 6 October 18th, 2006 02:16 PM
re: color change jack_in_black ASP.NET 2.0 Professional 0 July 11th, 2006 07:24 AM
how to display color palette swati_joshi ASP.NET 1.0 and 1.1 Basics 0 March 28th, 2006 04:32 AM
color acko ASP.NET 1.x and 2.0 Application Design 7 January 1st, 2004 12:41 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.