Results 1 to 7 of 7

Thread: Problem with Imagelist and 64-bit

  1. #1

    Thread Starter
    Hyperactive Member Jonny1409's Avatar
    Join Date
    Mar 2005
    Posts
    308

    Problem with Imagelist and 64-bit

    Hello,

    I wonder if anyone can help me please?

    I have inherited a VB.NET project which was created in VS 2003 and is now in VS 2010. It works fine on one macine (32 bit). However, on my Win7 64 bit machine it simply won't build or run.
    I get an error saying "xxx is not a valid Win32 application. (Exception from HRESULT: 0x800700C1) Line 4762, position 5"

    Through troubleshooting this, it appears as though there is a problem with imagelists in the project as if I remove these the project builds absolutely fine.
    I've tried removing them all and adding a new imagelist and the same problem occurs so it doesn't look like I'll be able to use the standard imagelists at all.

    Is this a common problem?

    If so, is there maybe a 3rd party control imagelist I can use instead?

  2. #2
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    Re: Problem with Imagelist and 64-bit

    Are you using a 3rd party reference which is 32bit only? You can change your project to x86 to test this, the default all All CPU which will change itself based upon your machine.

  3. #3

    Thread Starter
    Hyperactive Member Jonny1409's Avatar
    Join Date
    Mar 2005
    Posts
    308

    Re: Problem with Imagelist and 64-bit

    I don' think so, but the imagelist is definitely not 3rd party.

    Also, apparently the complexity lies with the fact that we are using clickonce - apparently this is 32 bit only or something, so changing the project properties won't help (or so I'm told).

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Problem with Imagelist and 64-bit

    Why exactly are you using an ImageList? There are some controls that require them, e.g. TreeView and ListView. If you're using them then you have no choice but to use an ImageList. If you have no specific requirement for an ImageList then don't use one, or any specific replacement. Add your images to the Resources page of the project properties and then access them as required via My.Resources.

    It would be interesting to know the cause of the issue though. What is the target platform and Framework version for the project? Have you tried creating a new project on that same machine and using an ImageList?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Hyperactive Member Jonny1409's Avatar
    Join Date
    Mar 2005
    Posts
    308

    Re: Problem with Imagelist and 64-bit

    It's not so much that we need the imagelist as such, it that it's been written this way in the past (long before my time) and it's going to be a huge ballache to take them all out and redo everything.

    The target framework is 2.0 and the target CPU is x86 (although I've tried changing this to X64 or Any CPU and the problem still occurs)
    However, a new project on this machine seems to work fine with an imagelist on it.

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Problem with Imagelist and 64-bit

    Did you create a backup when you upgraded the project? I wonder if it would be worth trying to upgrade again and see if you get the same issue.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7

    Thread Starter
    Hyperactive Member Jonny1409's Avatar
    Join Date
    Mar 2005
    Posts
    308

    Re: Problem with Imagelist and 64-bit

    I'm not 100% sure - I was just given the project in its 2010 form. I'll check.

    I get the feeling though that I'm going to have to knuckle down and fix it the long way by removing the imagelists.

    thank you though, I appreciate the help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width