Results 1 to 7 of 7

Thread: stupid color question [resolved]

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2003
    Location
    US
    Posts
    68

    stupid color question [resolved]

    hey i'm messing around with programatically setting colors and i'm trying to get the backcolor.toargb to work, heres what i got going ignore the registry thing thats all working, i just cant set the backcolor without the color.red for example i read up a bit and i guess i'm supposed to use the toArgB and fromArgB not getting it though



    VB Code:
    1. ' save setting here
    2. regKey.SetValue("Form", Me.BackColor.ToArgb)

    VB Code:
    1. 'set setting here
    2. Me.BackColor.FromArgb = regKey.GetValue("Form", "")

    any hints? thanx
    Last edited by NeonBurner; Jan 3rd, 2004 at 04:41 PM.

  2. #2
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    try using .ToString()
    \m/\m/

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2003
    Location
    US
    Posts
    68
    then my regvalue is

    Color [DarkGray]

    then backcolor.fromname or anyhting wont set it 2 what i want, i get the proper hex value from toArgb (ffd4d0c8) but cant set the color from it

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Mar 2003
    Location
    US
    Posts
    68
    says fromArgb accepts integer value but

    VB Code:
    1. Dim x As Int32
    2.         x = Clng(regKey2.GetValue("Form", ""))
    3.         Me.BackColor.FromArgb = x

    says " no accessible fromArgb excepts this number of arguements"

  5. #5
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    FromRGB is a function, not a variable or a property. That way you cant do FromRGB=value
    \m/\m/

  6. #6
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142
    you should be doing this...
    VB Code:
    1. Me.BackColor = Color.FromArgb(regKey.GetValue("Form", ""))
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Mar 2003
    Location
    US
    Posts
    68
    thanx, works perfect,

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