Need VBA Code to place color on a bitmap image

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JEO
    New Member
    • Feb 2007
    • 5

    Need VBA Code to place color on a bitmap image

    I have a Visual basic 3 App that I am converting to VBA in Microsoft Access 2003. The VB3 app successfully recolors a bitmap image with code using pixel locations when clicking on option buttons used for color selection.
    An example is:
    Grphecho!Pictur e3.PSet (xpos, ypos), RGB(RRGB, GRGB, BRGB)

    where the pixel positions are xpos and ypos in a Picture box(Picture3) using the Pset method.

    I know about the need for twips instead of pixels in Access 2003, and can successfully convert my coded pixel values to twips by applying 15 twips to 1 pixel.

    My problem is coding to the control on the Access form. How can I get an Image Control or Unbound Object Frame control to accept my x and y values from my code?

    Thanks much to anybody for reviewing this.
  • willakawill
    Top Contributor
    • Oct 2006
    • 1646

    #2
    Hi. Is there a really pressing reason to convert to VBA? Why not vb6?

    Comment

    • JEO
      New Member
      • Feb 2007
      • 5

      #3
      I like Access. I have also used VB a lot. I have been developing software for many years and prefer the convenience of working with everything in one place - forms, reports, database, code, etc. I've never been stopped (i.e. needed to abandon Access VBA and get outside to solve my programming problem).
      I have some intricate applications, mostly financial and medical customized.

      This is a case of whether it is possible to write to a bitmap image and then save the changes in Access - so I'm persuing that solution first.

      Any ideas about the specific problem?

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #4
        Originally posted by JEO
        I like Access. I have also used VB a lot. I have been developing software for many years and prefer the convenience of working with everything in one place ...
        Yes, that's what I've always like about Access too.

        I'll be very interested to see whether you find an answer to this one; it's something I have wondered about from time to time, but not really pursued. Some of the limitations that Access VBA imposes on your VB code can be extremely frustrating.

        Comment

        • willakawill
          Top Contributor
          • Oct 2006
          • 1646

          #5
          Originally posted by JEO
          I like Access. I have also used VB a lot. I have been developing software for many years and prefer the convenience of working with everything in one place - forms, reports, database, code, etc. I've never been stopped (i.e. needed to abandon Access VBA and get outside to solve my programming problem).
          I have some intricate applications, mostly financial and medical customized.

          This is a case of whether it is possible to write to a bitmap image and then save the changes in Access - so I'm persuing that solution first.

          Any ideas about the specific problem?
          I hate working with access. It feels far too amateur for me. Too limiting. I never use data bound controls and I do part of my programming in c++ because it runs so much faster. Access... yugh!

          Comment

          • Killer42
            Recognized Expert Expert
            • Oct 2006
            • 8429

            #6
            Originally posted by willakawill
            I hate working with access. It feels far too amateur for me. Too limiting. I never use data bound controls and I do part of my programming in c++ because it runs so much faster. Access... yugh!
            Perhaps, but at the time it was released, it was being compared to (for example) old versions of dBase. Access, with everything in one file, was a huge improvement over having various tables, indexs, forms, blah blah blah all in separate files.

            And of course, the fact that I was already using VB (um... probably v1 or 3 at the time) meant that it was very nice the way Access just slotted right in.

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32668

              #7
              Just posting to keep an eye.
              Have you considered asking Killer to move this thread to the Access forum? That way it may be more visible to those with the skill sets you need. I'm afraid I haven't used the graphics side at all in Access so I can't help personally.

              Comment

              • willakawill
                Top Contributor
                • Oct 2006
                • 1646

                #8
                Originally posted by NeoPa
                Just posting to keep an eye.
                Have you considered asking Killer to move this thread to the Access forum? That way it may be more visible to those with the skill sets you need. I'm afraid I haven't used the graphics side at all in Access so I can't help personally.
                Copied thread to access forum

                Comment

                • NeoPa
                  Recognized Expert Moderator MVP
                  • Oct 2006
                  • 32668

                  #9
                  Originally posted by willakawill
                  Copied thread to access forum
                  Will, could I ask that you move it instead.
                  A live thread like this copied will have problems in that none of us is subscribed to the new thread (I'm pretty sure) and it may even fork off (fork I said) in different directions.
                  The Access one certainly hasn't shown up on my radar yet.

                  Comment

                  Working...