15-10-2008, 06:00 AM
This could be a little useful for handling scroll bars in editors for choosing sprites. To get the total number of sprites this is what I did:
Make a picture box 1x1, set it to appearance-flat, border style-none, autosize-true, and visible = false, and name it picGetSize and place it in frmMainMenu or wherever...
Make a picture box 1x1, set it to appearance-flat, border style-none, autosize-true, and visible = false, and name it picGetSize and place it in frmMainMenu or wherever...
Code:
frmMainMenu.picGetSize.Picture = LoadPicture(App.Path & "/Gfx/Sprites.bmp")
SPRITE_COUNT = (frmMainMenu.picGetSize.Height \ 32) - 1
frmMainMenu.picGetSize.Picture = LoadPicture()