Results 1 to 11 of 11

Thread: Form BackGround Color[RESOLVED]

  1. #1

    Thread Starter
    Hyperactive Member ashay's Avatar
    Join Date
    Feb 2002
    Location
    Mumbai,India
    Posts
    278

    Smile Form BackGround Color[RESOLVED]

    hi,

    i need to know whether can i use my own colors for the background of a form.

    When i go to the form-->properties-->back color, i get onl limited colors in the pallete.I need to have my own custom color as background.

    The html equivalent of my colors is "#ccddff" and "#000033"

    Can anyone provide me with the Windows constant for these colors?????

    If this is not possible then another approach wud be that i will create a background image with thez colors.

    Can anyone help me in this????

    regds,
    ashay
    Last edited by ashay; Oct 7th, 2002 at 06:05 AM.
    "If you should die before me, ask if you could bring a friend."
    - Stone Temple Pilots

  2. #2
    Fanatic Member
    Join Date
    Apr 2002
    Posts
    638
    first one is RGB(204, 221, 255)
    second is RGB(0, 0, 51)

    ie.

    VB Code:
    1. Form1.BackColor = RGB(204, 221, 255)


  3. #3

    Thread Starter
    Hyperactive Member ashay's Avatar
    Join Date
    Feb 2002
    Location
    Mumbai,India
    Posts
    278
    hi,

    thanx for the reply....but i hv never used this kinda code before....
    can u plz explain how do i use it to change the form back ground color.......


    regds,
    ashay
    "If you should die before me, ask if you could bring a friend."
    - Stone Temple Pilots

  4. #4
    Fanatic Member
    Join Date
    Apr 2002
    Posts
    638
    just edited my last reply

  5. #5
    Frenzied Member wpearsall's Avatar
    Join Date
    Feb 2002
    Location
    England / UK
    Posts
    1,065
    Form_Load

    or command1_click

    when ever you want your color to change

    Mostly form_load
    Wayne

  6. #6

    Thread Starter
    Hyperactive Member ashay's Avatar
    Join Date
    Feb 2002
    Location
    Mumbai,India
    Posts
    278
    hi,

    dat was real fast....n it works....thanx a lot dude

    By the way ....mind telling me how u get the RGB values so that in the future if i need some different color i need not bother u

    regds,
    ashay
    "If you should die before me, ask if you could bring a friend."
    - Stone Temple Pilots

  7. #7
    Fanatic Member
    Join Date
    Apr 2002
    Posts
    638
    teehee, i kinda cheated i used paint shop pro (it allows you to enter an HTML colour code and will give you the RGB values). not sure how you do it in code, but i'm sure there's lots of threads about it if you do a search.

  8. #8
    Fanatic Member
    Join Date
    Apr 2002
    Posts
    638
    check out BuggyProgrammer's post in this thread:

    http://www.vbforums.com/showthread.p...light=html+rgb

  9. #9

    Thread Starter
    Hyperactive Member ashay's Avatar
    Join Date
    Feb 2002
    Location
    Mumbai,India
    Posts
    278
    hi tron,

    thanx a ton again.......

    All thez colors r static colors.....that is i dun wanna create the colors dynamically or sumthing like that.....

    so i guess i will also use the paint shop to do this

    thanx again....

    regds,
    ashay
    "If you should die before me, ask if you could bring a friend."
    - Stone Temple Pilots

  10. #10
    Fanatic Member
    Join Date
    Apr 2002
    Posts
    638
    the link i just posted has the code for it btw

  11. #11
    Frenzied Member wpearsall's Avatar
    Join Date
    Feb 2002
    Location
    England / UK
    Posts
    1,065
    U-can-also-use-M$-frontpage
    Wayne

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width