Solved

Sprite Animation

Posted on 1997-03-25
4
503 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
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…

760 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

22 Experts available now in Live!

Get 1:1 Help Now