Quote:
Originally Posted by JEO
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!Picture3.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.
__1 I was under the impression that the Twips to Pixel ratio is related to the Screen Resolution with typical 640X480 using 15 Twips per Pixel and most of the other Resolutions using 12 Twips per Pixel but this is hardly your main problem.
__2 In my opinion, the only possible chance you have to allow an Access Control to accept individual xPos and yPos Pixel location values, is via the Windows API which is very rich in this specifc type of functionality.
__3 The other problem is that you can be fairly assured that whatever API Call you attempt to make in this unique situation will most certainly require a Windows Handle (hWnd Property). To the best of my knowledge, the limited number of Controls that can accept Graphic data, do not have this hWnd Property since they are not true Windows. Forms and Reports have Handles (hWnd) but, again, I'm fairly sure that Controls contained within them do not.
__4 I apoplogize for being so negative but I do not think that what you are requesting is feasible. My only suggestion is to consult a professional Windows Programmer with some Access familiarity.