Results 1 to 5 of 5

Thread: [RESOLVED] Color and Files

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2009
    Posts
    5

    Resolved [RESOLVED] Color and Files

    Am writing a graphics program which will develop components and save them to files for later retrieval.
    Cant Figure out how to save the color component of the graphics to the file.
    The File seems to accept only string items and I have not been able to figure out how to convert the color string back to a color object.
    Anybody know the answer?

  2. #2
    Frenzied Member
    Join Date
    Mar 2005
    Location
    Sector 001
    Posts
    1,577

    Re: Color and Files

    Look at the Color.ToARGB and Color.FromARGB methods.
    The first gives you an integer describing a color(structure), the second returns a color from an integer.
    VB 2005, Win Xp Pro sp2

  3. #3
    PowerPoster SJWhiteley's Avatar
    Join Date
    Feb 2009
    Location
    South of the Mason-Dixon Line
    Posts
    2,256

    Re: Color and Files

    There are probably a million answers. What does 'the file' refer to? You can write anything you like to a file: string or binary data. Then there's serialization. Or you can custom write a format you like with functions to convert to and from that format.

    Perhaps showing what technique (i.e. a bit of code) you are using to save this data to 'the file' may help.
    "Ok, my response to that is pending a Google search" - Bucky Katt.
    "There are two types of people in the world: Those who can extrapolate from incomplete data sets." - Unk.
    "Before you can 'think outside the box' you need to understand where the box is."

  4. #4
    Master Of Orion ForumAccount's Avatar
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    2,802

    Re: Color and Files

    Are you looking for the Color.FromName() function?

  5. #5

    Thread Starter
    New Member
    Join Date
    Jun 2009
    Posts
    5

    Re: [RESOLVED] Color and Files

    Thanks for help

Tags for this Thread

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