Solved

Sprite Animation

Posted on 1997-03-25
4
511 Views
Last Modified: 2008-03-04
There are 3 parts to this question which each relate to this sprite query.

Initially, I would like to refer to the use of the picture box as a way to create a sprite through the API call BItBlt. I would like to know if it possible to store the BITMAP as some kind of data structure without having to actually have it loaded on the screen.

The second question relates to the ability to access the icons on the desktop, through an API call, or perhaps through .INI.

The third question which does not relate exactly to sprite, but to the use of the Joystick API functions and a way access a joystick through development in VB 32bit and not just VB 16 bit. The reason as to why it works only in 16 bit I am aware of so if this is your answer, don't bother, I need a solution to being able to develop with 32 bit and accessing the joystick


0
Comment
Question by:even032597
  • 2
4 Comments
 
LVL 1

Expert Comment

by:andyb013197
ID: 1424707
Yes it is possible to store the bitmap as a 'data structure'. Thats how its stored internally anyway when you see the term 'handle to a bitmap' HBITMAP in the api documentation. However I generally tend to use stretchdibits more than bitblt and pass the api the address of the bitmap bits (and also header) instead. This can all be done through VB with some work.

More than that I cant say, it depends on what you want to do..

You may get more response from others by upping your points though!


0
 

Author Comment

by:even032597
ID: 1424708
Any examples would be greatly appreciated.
0
 

Accepted Solution

by:
timbo032697 earned 50 total points
ID: 1424709
I'm trying to do exactly what you asked. What you need to do is set up a memory device context using the CreateCompatibleDC API function. Then BitBlt the bitmap into the memory DC. That's the easy part. The hard part is writing the routine that reads a bitmap file. You'll need to use the CreateDIBitmap function and the BITMAPINFOHEADER & BITMAPINFO structures. It's really too complicated to discuss here. Check out my animation tutorial at http://www.geocities.com/SiliconValley/Park/3269 or email me.
0
 

Expert Comment

by:timbo032697
ID: 1424710
I figured out how to do the first part of your question. Depending on what you're trying to accomplish, I have three different solutions. I believe it's worth more than fifty points, though. Whaddaya think?
0

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

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 …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

770 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