Announcement

Collapse
No announcement yet.

Windows Color Picker

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Windows Color Picker

    Does anyone have an idea how to access the Color Picker that is built into Windows? Is it possible to communicate with it from inside of AMS?

    I’d love to be able to let my users pick a color from the standard windows color picker window. Having it return the Hex, or RGB value to AMS. I don’t know if I’m looking for a DLL or an ActiveX control, or something else.

    I’m working on a graphics program in AMS. I found some graphics library DLLs that are pretty cool. Since I don’t have a slider control in AMS, I have to use buttons to increase and decrease Contrast, Brightness, Alpha level, etc. It works.

    Picking a color is a different ball game though. I started a sub project that would just be used to pick the color. I did a screen grab of the windows Color Picker. Now I have to set 256 hot spots, and 256 IF/Then statements to get the thing running. Eventually it could work, but being able to make a couple of calls to a DLL, to accomplish the same thing, might save about 500 lines of code, and the weight of a second sub-program.

    I suppose that if I were smart, I could build a little AMS project that could turn out the XML code for me, then I could just read the XML back into my Color Picker project.

    I know that at least some of these things (sliders) can be accomplished with Flash, but I don’t have, or know how to use Flash. Frankly, I’ve stopped holding my breath for the CD that Corey was talking about some months ago. No offense Corey, I’m behind on more than a couple of projects myself.

    This graphics program (photo manipulation) has been a challenging but fun project for me. It writes HTML files on the fly to act as the ‘canvas’, and writes and executes BAT files to call the graphics dlls and manipulate the photo. I need access to a color picker to be able to add text overlay, and matting features, to the program.

    If anyone has any hints on how I can do this I’d be grateful.

    Thanks, Jim

  • #2
    Re: Windows Color Picker

    Here ya go...

    Download Sample & DLL

    Comment


    • #3
      Re: ###UPDATED### Windows Color Picker

      Just a short note to say that the download has been updated to return either the HEX value, or a Red;;Green;;Blue value.

      Comment


      • #4
        ###UPDATED### My T-shirt and socks...

        That is seriously sweet Worm. Seriously, seriously sweet. In fact, for me personally, this is my fave .dll from you so far. The others are all superb too but this one is sooooo cool. You are providing some seriously professional tools around here nowadays, big thanks from all the IR team to you...

        Corey Milner
        Creative Director, Indigo Rose Software

        Comment


        • #5
          Re: ###UPDATED### My T-shirt and socks...

          Thanks Corey.

          I need to do one more thing on this yet though. As it is now, you feed it a seed color to start out with in HEX. I changed the DLL to return either HEX or RGB, now I need to make it so you can feed it the seed color in either HEX or RGB.

          Comment


          • #6
            Re: ###UPDATED### Your tie and coffee mug...

            Other than gypsies and circus freaks does anyone use RGB anymore? Maybe the Amish...

            Interestingly HEX values tell you the same thing as RGB values do, even at a glance, if you know how to read them but amazingly I found during my teaching days that no one ever did. [img]/ubbthreads/images/icons/smile.gif[/img] It's as though people think hex values are just arbitrary labels for colors with no [instantly discernable] logic system behind it...\

            Here's a great link I used to hand out on the topic if anyone's interested http://support.sas.com/techsup/techn...688/ts688.html Excellent article, that guy makes it clear as a bell.

            Corey Milner
            Creative Director, Indigo Rose Software

            Comment


            • #7
              Re: ###UPDATED### Your tie and coffee mug...

              Probably not, but I'd like to offer it, Also need to make it so that your Custom Colors get saved. That shouldn't be too big a deal, I hope anyway [img]/ubbthreads/images/icons/smile.gif[/img]

              Comment


              • #8
                Re: Windows Color Picker

                Worm, you are awesome! You rock my world. Thank you so much.

                I need a little more help though, sorry to ask. I can’t seem to get this to work. When I click on one of the buttons I get an error. It says:
                Could not find function.
                C:\path\to\your\cool\dll\chcolor.dll::SelectColor

                I get the same error with version 1 that you sent me, and version 2 that is posted here. I’m not sure what I’m doing wrong. I’m sure looking forward to using this. Thanks again, you are amazing.

                I’m running XP home, if that matters.

                Comment


                • #9
                  Re: ###UPDATED### My update list...

                  I'm just teasing Worm, programmers (and Amish) in general still use RBG so you're in good stead.

                  Corey Milner
                  Creative Director, Indigo Rose Software

                  Comment


                  • #10
                    Re: ###UPDATED### My update list...

                    I dream of a DLL that returns Hex or RGB, and Worm is kind enough to give me (us) both. That means I can use the RGB values now, and if I ever shave my beard and convert, I can use Hex.

                    Comment


                    • #11
                      Re: Windows Color Picker

                      Last time this type if thing happened it was because the version of AMS was not the latest and greatest.

                      Make sure you are running AMS 4.0.0.4

                      Comment


                      • #12
                        Re: ###UPDATED### My beard and buggy...

                        hehe [img]/ubbthreads/images/icons/laugh.gif[/img]

                        Corey Milner
                        Creative Director, Indigo Rose Software

                        Comment


                        • #13
                          Re: ###UPDATED### My update list...


                          I'm just teasing Worm, programmers (and Amish) in general still use RBG so you're in good stead.
                          Now RBG is a whole new concept. Leave it to Corey to think "outside" the box. [img]/ubbthreads/images/icons/smile.gif[/img]

                          Comment


                          • #14
                            Re: ###UPDATED### My hairstyle...

                            C'mon surely you've heard of Right Said Fred's "really bald guy" system before, works like a charm... "I am too orange for your blue, too purple for your green, oh you know it's true..." etc.

                            Corey Milner
                            Creative Director, Indigo Rose Software

                            Comment


                            • #15
                              Re: Windows Color Picker

                              Thanks Worm, that was it exactly. I’m so embarrassed. This is exactly it, just exactly what I wanted. Thank you very much. I noticed that the Add to Custom Colors does work from the Basic Colors Pallet. You have been very kind to me, to all of us. I hope that other people download and use this too.

                              A couple of nights ago, I was reading some old threads, and I came across a little program that you had written. Something of yours that I happened to miss. Let me tell you, I used it last night, and I for one liked it. It saved me time.

                              It was your program that zeroed all the variables out. I’m building a database, and when one record is entered, I want to be sure that everything on the form is zeroed back out. For some reason this was working fine on the first record, but the even if I re-loaded the page, I’d still have leftovers from the previous record. I just dropped the twenty lines of code your little program wrote for me, into the On Initialize for the page, and my problem was solved. And I didn’t have to keep track of my variables. So everyone else in the thread that was hassling you about it, can just BUG OFF, as far as I’m concerned. I used it, and I liked it. Thanks.

                              Comment

                              Working...
                              X