Solved

in-between 2 objects

Posted on 2002-06-24
15
132 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
15 Comments
 
LVL 16

Expert Comment

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

Accepted Solution

by:
mdougan earned 50 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
 
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

708 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now