VB LoadPicture()

Started by
3 comments, last by TravisWells 19 years, 7 months ago
Hello, im attempting to change an image in a picture box in vb, however im a four dimensional array to store the image number (in this case the number is 1, and that works correctly, have debugged it.) and then the file extension (.gif) would be tagged on to the end. however for some reason it is giving me an error, saying "type mismatch". this is gunna be a stupid error on my part, but im just too tired to figure it out. so thnx for the help. heres the line thats causing my problem: Tiles(q - 1 + a - 1).Picture = LoadPicture(App.Path + "\tiles\" + TileNum(q - 1, a - 1, worldx, worldy) + ".gif") Thanks in advance for the help, its much appreciated
------------------------------------Mitch Mulholland----------A.K.A.= TwisteR---------------------------------------
Advertisement
bump
------------------------------------Mitch Mulholland----------A.K.A.= TwisteR---------------------------------------
Is the type of TileNum string? You may need to convert it first if it's an integer.
Thanks, that fixed that problem, however, now there is a space infront of the 1, so it cant find the file. lol. is there neway i can fix this? thnx
------------------------------------Mitch Mulholland----------A.K.A.= TwisteR---------------------------------------
I think there is a trim function that removes whitespace, ltrim or ltrimstr, I think.

This topic is closed to new replies.

Advertisement