Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid Picture In Visual basic 6

Tags:

vb6

I am developing a proj in vb 6. what the problems is that when i load icons(extension .ico) it gives "Invalid Picture". I searched it out on all the forums but still lying in. Any help would greatly be appreciated.

Image1.picture = loadpicture(app.path & "\Abc.ico") 

But when convert the file to jpg from ico format :

image1.picture = loadpicture(app.path & "\Abc.jpg")

It is loaded to Image1.

i have also converted the icon file it to 24 bit from 32 bit but still is not working.

like image 338
Muhammad Usman Avatar asked Sep 13 '25 05:09

Muhammad Usman


2 Answers

Your icon is probably a 32bit icon- it just needs to be changed to 24bit in order for it to be supported in VB6. You can use a program like IcoFX to change the bit depth.

like image 66
Victor McManus Avatar answered Sep 14 '25 23:09

Victor McManus


You must create your icon file using a generator that actually saves it as an .ICO. You cant try to take a jpg or png and re-save it as an .ico file.

like image 38
logixologist Avatar answered Sep 14 '25 23:09

logixologist