?
Solved

Transparent background on imported bitmaps

Posted on 1998-09-12
4
Medium Priority
?
246 Views
Last Modified: 2010-04-30
I have a large Picture box with a 16 colour image
I can draw ontop of the image or place my bitmaps on the image
The problem is I have 63 small black on white bitmaps i want to be able to place on the large image, however I don't want a white background i want either
1) a transparent background so the colour underneath becomes the background
or
2) a way or changing the background colour at runtime so that it matches the image below
(the image will be placed on a solid single colour)

I am happy to change the images to a different format if that will help
i have paint shop pro
I hope i have explained what i want enough. if not request more.
Can you help
Sue
0
Comment
Question by:SueBond
  • 2
  • 2
4 Comments
 
LVL 2

Expert Comment

by:wj7ster
ID: 1434536
If you are using VB5/6 you can create a simple Usercontrol and set the 'MaskPicture' property and 'Picture' propertiy to contain the bitmaps (you will have 63 instances of this Usercontrol and each should contain the same picture in both 'MaskPicture' and 'Picture' properties.), and the 'Backstyle' property to 'Transparent'

I do have some code somewhere that uses APIs to achieve more-a-less the same result, the only difference is that with the APIs you need to manually repaint the bitmaps if it were covered at some stage by another form.  The usercontrol method's bitmaps are persistant and you don't need to worry about redrawing them.

If you are really in need of a different solution, e-mail me, and I will send you the code.  It is quite long, and I don't think if will be appropriate to put such long answers in here.

Good luck.

e-mail: willem@sevenster.co.nz
0
 

Author Comment

by:SueBond
ID: 1434537
Sorry I forgot to mention i only have VB4 enterprise edition
0
 

Author Comment

by:SueBond
ID: 1434538
I only have VB4 so the answer is no use
wj7ster-If you e-mail me the code and it works i will give you the points
in the meantime can anyone else help
Thanks
Sue

0
 
LVL 2

Accepted Solution

by:
wj7ster earned 400 total points
ID: 1434539
Sue,

I e-mailed you a VB Project to Sue@greatworth.demon.co.uk


0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month15 days, 8 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question