Results 1 to 6 of 6

Thread: simple image manupulation

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2007
    Posts
    42

    simple image manupulation

    Hello.

    First, what is the best way to have embedded pictures?

    I have 3 pictures.

    When I click button1, I need the picture1.gif to appear for 0.5 seconds. After that, i need that one to dissapear and another two to appear.

    They can all be at different locations, and use different picture boxes, as long as they are embedded.

    No other manipulation is done (such as saving, moving, editing etc).

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

    Re: simple image manupulation

    Go to the Resources tab of the project properties and add your Images there. You can then access each via its own property of My.Resources.

    Just note that each time you access My.Resources a new Image object is created. As such, if you want to use the image multiple times you should access My.Resources only once and assign the Image object to a variable, then access that multiple times.
    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

  3. #3

    Thread Starter
    Member
    Join Date
    Dec 2007
    Posts
    42

    Exclamation Re: simple image manupulation

    Ok, I did that but i have ONE problem.

    And the problem occurs ONLY with one .gif image.

    When I start it, the image appears and animation starts, but this is what happens.

    Error Msg:

    ExternalException was unhandled


    "A generic error occurred in GDI+."

    An I really need this file :-(((

    anyone?

  4. #4
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,762

    Re: simple image manupulation

    Quote Originally Posted by [venom]
    Ok, I did that but i have ONE problem.

    And the problem occurs ONLY with one .gif image.

    When I start it, the image appears and animation starts, but this is what happens.

    Error Msg:

    ExternalException was unhandled


    "A generic error occurred in GDI+."

    An I really need this file :-(((

    anyone?
    sounds like you're have a problem with the code you wrote. Without that, its kinda though to know what is wrong. Its like trying to see with your eyes closed. Can you post code?
    Process control doesn't give you good quality, it gives you consistent quality.
    Good quality comes from consistently doing the right things.

    Vague general questions have vague general answers.
    A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.

    ______________________________
    Last edited by kebo : Now. Reason: superfluous typo's

  5. #5

    Thread Starter
    Member
    Join Date
    Dec 2007
    Posts
    42

    Re: simple image manupulation

    It even happens when i start to load it in new empty project.

    Even the simple way, If i add a picturebox, and import the file it doesn't work that way either.

    But picture works fine in windows viewer.

    damn!

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

    Re: simple image manupulation

    So you're saying that if you use any other image your code works fine but that one causes an exception, correct? I'd try removing it from your resources and re-adding it.
    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

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