DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2007

    Unhappy 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


  2. #2
    Join Date
    Oct 2005
    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 ?
    Programmer&Cracker CS

  3. #3
    Join Date
    Dec 2003
    San Diego
    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.

    Good luck,
    Michael Sanchez
    Managing Technical Editor
    Forum Moderator

  4. #4
    Join Date
    Oct 2007

    More background

    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.

    Thanks again


  5. #5
    Join Date
    Apr 2007
    Sterling Heights, Michigan
    The only way I know of the uninstall the VB6 runtimes is to uninstall VB6.

  6. #6
    Join Date
    Oct 2005
    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 ?
    Programmer&Cracker CS

  7. #7
    Join Date
    Oct 2005
    Staffordshire, England
    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.


Similar Threads

  1. Image Control problem.
    By Shannon in forum VB Classic
    Replies: 2
    Last Post: 05-15-2006, 02:16 PM
  2. Image problem
    By Jack in forum Web
    Replies: 0
    Last Post: 09-13-2001, 04:29 PM
  3. Script for scrolling
    By Mark in forum Web
    Replies: 3
    Last Post: 08-30-2001, 11:45 AM
  4. Replies: 1
    Last Post: 08-01-2000, 01:51 PM
  5. Problem with using ADO Data Control
    By Kamal in forum VB Classic
    Replies: 0
    Last Post: 06-22-2000, 01:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.