473,397 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Need VBA Code to place color on a bitmap image

5
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.
Feb 28 '07 #1
8 3962
willakawill
1,646 1GB
Hi. Is there a really pressing reason to convert to VBA? Why not vb6?
Feb 28 '07 #2
JEO
5
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?
Mar 1 '07 #3
Killer42
8,435 Expert 8TB
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.
Mar 1 '07 #4
willakawill
1,646 1GB
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!
Mar 1 '07 #5
Killer42
8,435 Expert 8TB
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.
Mar 1 '07 #6
NeoPa
32,556 Expert Mod 16PB
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.
Mar 1 '07 #7
willakawill
1,646 1GB
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
Mar 1 '07 #8
ADezii
8,834 Expert 8TB
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.
Mar 2 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: sector119 | last post by:
I use python 2.4.1 and PIL 1.1.5 and when I execute my program I got error: ../code.py Traceback (most recent call last): File "./code.py", line 7, in ? class DrawPlus(ImageDraw.Draw):...
3
by: RodeoJoe | last post by:
I need an ActiveX control, or any other solution which permits me to show only a part of a huge bitmap (about 4000 X 3500 pixels) for each record in an Access database. The part of the image...
4
by: Phil | last post by:
k, here is my issue.. I have BLOB data in SQL that needs to be grabbed and made into a TIF file and placed on the client (could be in temp internet dir). The reason we need it in TIF format is...
0
by: Earl Teigrob | last post by:
I am having a problem where the bitmap image that I just created and saved to disk can not be found but the code in another area of the program. When I reattempt to access the same image, it...
4
by: David | last post by:
I have a problem that just cropped up with using an ImageList in my project I am using VB .NET 200 Problem: I have existing Form with 2 Image List controls. ImageList16 (for 16x16 Images) and...
6
by: tommaso.gastaldi | last post by:
In a previous post I have been asking about a way to test Alpha Transparency. Bob and Michael have kindly provided some ideas. Here I would like to share the function I have prepared, for the...
2
by: soxmax | last post by:
I am creating some image analysis software. My software is developed specifically for bitmap images size 1280X1024 pixels. Now my boss wants to be able to load images of any size into the software....
8
by: JEO | last post by:
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...
15
by: active | last post by:
Below is a small but complete program that appears to show you can't retrive a Palette from the clipboard. This is true whether the palette is placed on the clipboard by Photoshop or Photoshop...
6
by: Alfonso2968 | last post by:
Hello, If someone can help plz. I have searched everything and all I can find is how to drag and drop within a form from panel to panel. What I need to do is Drag an image from the desktop...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.