473,387 Members | 1,441 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

vb colors

lee123
556 512MB
is there a way to customize your own colors (Back colors)like "Burgandy", "champagne", "Teal", "Dusty Rose" things like this.

if so how would i do this?
lee123
Dec 2 '07 #1
3 1746
lotus18
866 512MB
is there a way to customize your own colors (Back colors)like "Burgandy", "champagne", "Teal", "Dusty Rose" things like this.

if so how would i do this?
lee123
Hi lee

I'm not sure about this if this is what you really want. I think you need to create a sub function for that

Here's my simple code:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2.     'Assuming Burgandy. I don't know the exact color : )
  3.     Me.Burgandy 0, 100, 100
  4. End Sub
  5.  
  6. Sub Burgandy(r As Long, g As Long, b As Long)
  7.     Me.BackColor = RGB(r, g, b)
  8. End Sub
  9.  
Rey Sean
Dec 3 '07 #2
lotus18
866 512MB
Or you can create CustomColors class module, then under that class you can create sub-class (I'm not sure if this is the correct term), then instantiate the new class.

CustomColors
Expand|Select|Wrap|Line Numbers
  1.  
  2. 'CustomColors Class 
  3. Public Sub Burgandy(r as Long, g as Long, b as Long)
  4.      <codes here>
  5. End Sub
  6.  
  7. Public Sub Magenta(r as Long, g as Long, b as Long)
  8.      <codes here>
  9. End Sub
  10.  
Call it

Expand|Select|Wrap|Line Numbers
  1. Private Form_Load()
  2.     Me.Burgandy (100, 100, 100)
  3. End Sub
  4.  
Rey Sean
Dec 3 '07 #3
lee123
556 512MB
hi (lotus18)

i'll give these a try and write back if it works thanks for the response.

lee123
Dec 3 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: aznFETISH | last post by:
I have a list of links that I ue on my page, I alternate background colors for these links in a table, I usually do it using a DB but this list of link is manually added into the page so my...
7
by: Laszlo Zsolt Nagy | last post by:
Hello, How can I determine the number of colors used in an image? I tried to search on Google but I could figure out. I read the PIL handbook but I do not see how to do it. Can anyone help? ...
5
by: Dan Jacobson | last post by:
What's Nielsen talking about in http://www.useit.com/alertbox/20040503.html http://www.useit.com/alertbox/20040510.html Can't a good browser keep track of visited vs. unvisited link colors? Is my...
3
by: Marc | last post by:
Hi, maybe you guys know something I don't know... Is it possible (and how) to achieve the following: 1) A <BODY> with specific background-color, say blue. 2) A <DIV class='main'> (which...
6
by: Danny Lesandrini | last post by:
I'm using an Access database to drive a web site and the colors of various table backgrounds are stored in Access. I want users of the Access database to be able to select colors for the site, but...
0
by: mark | last post by:
Somebody can explain me why if I put a color with SetPixel the color showed is of another value? For example: I've to draw a grayscale image. The color RGB(90,90,90) become RGB(40,45,60). In the...
6
by: Mark | last post by:
Is there a programatic way to iterate through all the named colors? Something like: HtmlTable ht = new HtmlTable(); HtmlTableRow htr; HtmlTableCell htc; foreach (Color c in ) //I CAN'T FIND...
11
by: Paul Smith | last post by:
I have a button on my web page the backcolor of which I want to change: btnSample.backcolor = ???????? I want the color to be Gainsboro However I enter Gainsboro or color.Gainsboro I have...
1
by: Demi | last post by:
I want to be able to define standard colors in a base form, then have child forms use those values instead of standard colors. Ex in my base form I want to do this: Color myColor =...
5
by: Stick | last post by:
Hi, I normally program in C++, and I'm trying to write this little tool in C#, but I quickly realized that I can't use pointers, so instead I need to create an array of 3 Color 's private...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.