[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

in-between 2 objects

Posted on 2002-06-24
15
Medium Priority
?
142 Views
Last Modified: 2010-05-02
There are 2 racks on my bitmap. One of them is more inward than the other, and they are overlapped (the more outward one covers the 'relatively' more inward one). I want to set a forklift that travels between the two racks... What tricks do I need to use in Photoshop6 and VB ActiveX controls in order to achieve this?
I might set up an image on my homepage... inform you when I'm done...
Thanks
Jack
0
Comment
Question by:luckie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
15 Comments
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7104421
Sorry, i didn't understand.
0
 
LVL 18

Accepted Solution

by:
mdougan earned 200 total points
ID: 7105258
luckie,

I provided you with a sample in your other question regarding the same topic.  

http://www.experts-exchange.com/vbcontrols/Q_20313499.html

You haven't responded in some time.  In this example, I told you to download the CustomBLT.zip sample from the Karl Peterson's VB website, then, I provided you with some sample code for manipulating the bitmaps so that it appears as if the middle layer goes behind the foreground layer, and above the background layer.

The only trick you have to do with the bitmaps is to paint the part of the background of the image in a specific color (Karl's example uses Black, but I usually suggest using a color that is not likely to appear in the non-transparent part of your image).

I suggest, in the question above, that you add a couple of new picture boxes to Karl's sample, and put your sprite's image in one of them (your forklift - assuming that you have painted the transparent part of this bitmap to black), and you can quickly see a working example.

Try this and provide some feedback.  This is the only way we can help you to solve your problem.
0
 

Author Comment

by:luckie
ID: 7106212
mdougan,
  I can't use block transfer because I'm already using ActiveX controls.. Sorry about it!
Jack
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 18

Expert Comment

by:mdougan
ID: 7106422
That comment makes no sense to me.  First, what is "block transfer".  Second, what does that have to do with ActiveX controls?

My suggestion can be coded inside of an active-X control, or anywhere else.  It simply uses some picture boxes and a few Windows APIs.  I'm not sure what you think you can't use here.
0
 

Author Comment

by:luckie
ID: 7109456
it is because I've already written about 1000 lines of code and I don't want big changes.. Sorry about it and thanks

JAck
0
 

Author Comment

by:luckie
ID: 7109602
it is because I've already written about 1000 lines of code and I don't want big changes.. Sorry about it and thanks

JAck
0
 

Author Comment

by:luckie
ID: 7137106
Hi, anyone here
0
 
LVL 18

Expert Comment

by:mdougan
ID: 7139167
You are not giving us enough information to go on.  First, it sounded like you were asking how to do this technique.  This information was provided.  Then, you said that there was something in that other technique that conflicts with something you are currently using, but you haven't explained how it conflicts.  Then, you state you have 1000 lines of code that you don't want to change.

Let's start over.  If you have existing code, and it's not working for you, then provide us with a sample of the code, and we will help you to get it to work.

If you do not have any code yet for doing this animation technique, then please explain what part of the proposed solution I gave that uses the class that you can get from Karl Peterson, which works with ordinary pictureboxes, is not compatible with your current code.

From what I can see, the code provided would be easy to add to your existing project, and should not require you to change much, unless you already have code in place for doing this animation.  In which case, you need to show us a sample.
0
 

Author Comment

by:luckie
ID: 7139330
ok, i will set up a homepage when I return home tonight! :)
Thanks
Jacky
0
 
LVL 18

Expert Comment

by:mdougan
ID: 7139461
Great!
0
 

Author Comment

by:luckie
ID: 7168567
home.netvigator.com/~luckie/download.html
0
 

Author Comment

by:luckie
ID: 7274134
Let me explain in a much cleaner way. First off, I got an image sitting in the background. This background contains some racking systems which are part of the background (that can't be changed). What I'm trying to do is to turn the racking systems into objects so that I can make the background of the object transparent and the object manipulated .So if I have 2 racking systems and there is an aisle in the middle I can make the forklift travels in the aisle as if it's really travelling in the middle of the racks... therefore how do I make part of dead fixed background to a manipulated objects?
Bye & thanks
Jack
0
 
LVL 18

Expert Comment

by:mdougan
ID: 7275707
Hi Jack,

Yes, I understood what you wanted, and provided samples that should allow you to do that.  However, just to make sure you understand.  You need to think of the background and perhaps one of the racks as one layer, then the foreground rack as another layer.  Then, you'd move your forklift or whatever between the first and second layer.

The way to make the different layers is inside of a graphics program such as Adobe Photoshop.  What I'd suggested is that the foreground layer should be made such that every part of the image that is not what you want to show as the foreground image, should be painted a single solid color.  Pick a color that is not included in the part of the image that you want to show as the foreground.  Usually, hot pink or something along those lines works well.

Then, you have to look into the Transparent BitBlt routines I mentioned before.  The idea is this.  

You have some picturebox what holds the backgound image in it, some picturebox with the foreground image in it, and some picturebox with the sprite image (the forklift) in it.

First, you bitblt the background image to the screen, then, you bitblt the sprite (forklift) to the screen, then you do a transparent bitblt of the foreground image to the screen.  The transparent bitblt routine will not copy any of the transparent color (say, hot pink) when it is written to the screen, so, anything that is in the back ground will show through.

Now, I gave you a reference to a project that you could download that had most of the code for doing all of the bitblts, then, I provided an example of how to modify that project to demonstrate the background, sprite, foreground animation.  So, I don't know what else I can say.  If you don't try my suggestions, there is nothing more I can do to help you.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7962897
Hi luckie,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept mdougan's comment(s) as an answer.

luckie, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 5

Expert Comment

by:Netminder
ID: 8023292
Per recommendation, force-accepted.

Netminder
EE Admin
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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

656 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