Bad Code, Bad Method, or Bad Choice Of Programming Language? [RESOLVED]
Hi, and thank you for attempting to help me with my problem. I'm trying to make a tile game and I made some code to load graphics from a tiled BMP. It works and all, but not always. It can load the same section of the picture over and over, but when you try to load a different section, it doesn't load it! So what do I do?
Please test it for me and help me out please!
VB Code:
Public Function LoadGraphics(FileName As String, PosX As Long, PosY As Long, Width As Long, Height As Long) As Boolean
I mean this in the nicest way possible but if you don't know what the BitBlt api returns, then i doubt you can help me. You're not really suppose to do anything with it other than check for errors.
What you need to decale is the 2 functions in there, which are LoadImage, and BitBlt. Then you need to make a frmMain. Put a picture box on it with the name "MapTiles" and set its index value to 0 to create a control array. Now it should work!
OMG...don't tell me that no1 knows how to do this. THIS IS BASIC. I know how to do it, but I can't figure out why it does the same thing over and over... Common, someone must have a slightly different version out there.
I know what Bitlt returns... And I did not need to follow your instructions to add the picturebox and the API functions... But what happens is that it won't do anything.
If I did not know what to do I would have said which errors I had, but I simply ran it and it wouldn't do anything... First I thought it might be that the file needed to be BMP... So I changed the JPG I had (And yes, I made a new folder "Maps" in the same folder where the project is and I put the image)
But what I meant is you should have said which the requirements were before. There is a thing called documentation and it really helps debugging. I have another version of this Tile thing... Yes, with BitBtl... But I would have to search for it.
We miss you, friend... Rest in Peace, we will take care of the rest of it.
[vbcode]
On Error Me.Fault = False
[/vbcode]
- Silence is the human way to share ignorance
Tec-Nico