Problem loading a JPG into an image control
I have a program that loads pictures into an image control.
ie -> image1.picture = LoadPicture(filepathandname)
On my dev machine, an XP PRO with visual studio VB6 installed.
All works fine.
Trying to get the program to work on a win98 box keeps creating an illegal operation with reference to Kernel32.
My installation script indicated that some of the files needed to be replaced. (From standard package and deployment wizzard), and I fear that my VB6 runtimes are now messed up.
I have tried to replace many of the files, but I keep getting the error. I can load a BMP no problem, but the image control should also be capable of using the JPG format.
I either need ot understand image control imitations, or someone to help me understand how I can fully uninstall VB6 runtimes and then re-install.
Help is appreciated
kernel32 problem ? it's the core of an operating system, i don't know exactly but seems that the method used to load jpg images in win98 is different than the one used in winxp . have u tried to build the application under win 98 ?
VB6 was first released in '98, so there is a good chance your Win98 OS is only compatible with VB5. Along the lines of what Amahdy said, maybe you should also check the version of VB that shipped with your version and build of Win98.
Managing Technical Editor
Thanks for the suggestions guys.
For more background...
VB6 and win 98 are very capable of displaying JPG using a picture object. (I have done so in the past)
I realized after churning through the code that I was using image boxes. (Auto scale was the reason).
There might be a limitation of loading a JPG into the image object... but agian I believe that it should be ok.
The biggest issue is that the compiled project (My winxp box) indicated that one of the DLL's needed updating which is bogus, I unfortunately clicked the ok.... I think that my runtimes and dll's are possibly messed up on my win 98 platform. (I don't want to reload the OS) so.. If anyone knows how to uninstall all vb6 runtimes and associated files it might be the silver bullet that I am lookign for.
The only way I know of the uninstall the VB6 runtimes is to uninstall VB6.
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
package and deployment will export the exact needed dll's to run the program anywhere, under win98 too, so maybe if you updated any dll, it will export it with your project ... or did u mean reset the vb6 runtimes installed under win 98 ?
I use Win98SE and I don't have any problems using
Image1.Picture = LoadPicture(filepathandname)
If you not using VB6 with Service Pack 6.0 then I suggest you update.
To find what Service Pack you are using watch the splash screen as VB starts up or use Help\About Microsoft Visual Basic....
I've been programming with VB for 15 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.
By Shannon in forum VB Classic
Last Post: 05-15-2006, 03:16 PM
Last Post: 09-13-2001, 05:29 PM
Last Post: 08-30-2001, 12:45 PM
Last Post: 08-01-2000, 02:51 PM
By Kamal in forum VB Classic
Last Post: 06-22-2000, 02:17 AM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL