Ok ive been also doign research on .bni files which i saw a few posts about and i was wondering how one would contruct a image from a .bni file. If anyone has any ideas they would be much appreciated. Yet again maybe not helpful but my bot is in vb.
You'll need an owner draw listbox. You convert the targa image into a bitmap, select it in a compatible dc using SelectObject(), and draw an icon to your listbox which depends on the user flags and product.
Quote from: Maddox on May 13, 2004, 01:26 AM
You'll need an owner draw listbox. You convert the targa image into a bitmap, select it in a compatible dc using SelectObject(), and draw an icon to your listbox which depends on the user flags and product.
That was a really-well written response Maddox. Good help! :)
Documentation on converting icons.bni to a targa can be found here (http://linkware.clan-mac.com/kanebot/misc/bni_file.shtml).
Quote from: TheNewOne on May 13, 2004, 12:40 AM
Ok ive been also doign research on .bni files which i saw a few posts about and i was wondering how one would contruct a image from a .bni file. If anyone has any ideas they would be much appreciated. Yet again maybe not helpful but my bot is in vb.
A BNI file is simply a Targa file with an added header to specify the coordinates of each individual icon and how to use them. You never specified what type of image you want to convert it to, but if you want to make a valid TGA file from the BNI, then you can just remove the header. If you want to save it as a different format, then I suggest you search for a documentation for the format you want to use.
Quote from: Myndfyre on May 13, 2004, 03:34 AM
Quote from: Maddox on May 13, 2004, 01:26 AM
You'll need an owner draw listbox. You convert the targa image into a bitmap, select it in a compatible dc using SelectObject(), and draw an icon to your listbox which depends on the user flags and product.
That was a really-well written response Maddox. Good help! :)
Meh I was about to go to bed and didn't feel like writing a detailed response. I probably shouldn't have responded at all.
!! you guys are gods. Always giving me the answers I exactly need for my problem. Im sorry for asking so many things but im tryign to learn. Thanks for the support
Quote from: Myndfyre on May 13, 2004, 03:34 AM
Quote from: Maddox on May 13, 2004, 01:26 AM
You'll need an owner draw listbox. You convert the targa image into a bitmap, select it in a compatible dc using SelectObject(), and draw an icon to your listbox which depends on the user flags and product.
That was a really-well written response Maddox. Good help! :)
What happened to the karma system that used to be on these boards?
I am having trouble loading the image into a picture box.
Dim intH As Integer, intW As Integer
For intH = TGAHeader.Height To 0 Step -1
For intW = 0 To TGAHeader.Width Step 1
Get #1, , PixelData
Picture1.PSet (intW, intH), RGB(PixelData.Red, PixelData.Green, PixelData.Blue)
Next intW
Next intH
Private Type pixeldat
PacketHeader As Byte
Blue As Byte
Green As Byte
Red As Byte
End Type
I am 85% sure all my other types are loaded with the right data but the picture is jargled.
You have to decompress the TGA (can probably find some function off Google to do this)
Alright thanks, if anyone has this code for vb can you please post it?