Results 1 to 12 of 12

Thread: Faster Form (slowed down by image in it)

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    Talking Faster Form (slowed down by image in it)

    I got a form with a background image in it.
    Jpg 16 kb.
    But it realy runs slow...
    Anyone know where or how to speed it up?

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Faster Form (slowed down by image in it)

    Its not the picture itself that is slowing the form down. Its your code.
    I don't live here any more.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    Re: Faster Form (slowed down by image in it)

    I don't think so!
    Because When I put an JPG in it with only 4 kb the form runs normal
    and fast!

  4. #4
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727

    Re: Faster Form (slowed down by image in it)

    Sounds like the problem is with the 16 kb Jpg .

  5. #5
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Faster Form (slowed down by image in it)

    Quote Originally Posted by HWijngaarD
    I don't think so!
    Because When I put an JPG in it with only 4 kb the form runs normal
    and fast!
    Didn't mean any offense. Are you editing the image while its in the background? You didn't post any code so we can't really help you much.
    Last edited by wossname; Mar 4th, 2005 at 05:28 AM. Reason: Altered question slightly.
    I don't live here any more.

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    Re: Faster Form (slowed down by image in it)

    I just put the picture in the form backgroundImage.

    You sure my code slows down the form??
    Ans if it's the code what can I do to speed it up?
    Any suggestions?

    (I got lot's of code in my form (about 4000 lines), a lot of modules and a few classes)

  7. #7
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Faster Form (slowed down by image in it)

    Quote Originally Posted by HWijngaarD
    I just put the picture in the form backgroundImage.

    You sure my code slows down the form??
    Ans if it's the code what can I do to speed it up?
    Any suggestions?

    (I got lot's of code in my form (about 4000 lines), a lot of modules and a few classes)


    We cannot help you mery much because we don't know what your code does

    It would be cool if you could Zip your project and post it up here. Assuming it's not a trade secret or anything :mike:



    Please don't feel insulted by this but:
    You are not loading the image from a file with code in the form's paint event or anything like that? That would cause devastating performance issues. I'm sure you wouldn't have done that though.

    I don't live here any more.

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    Re: Faster Form (slowed down by image in it)

    I can't show the code,
    because it needs a database right in the beginning of the form
    on different locations and it's confidential.
    But I asure you, I got nothing weird in the code.
    I got a label on the form wich when I click on it the
    mousedown of it changes the me.backgroundImage
    by loading the file from a directory in the application location.
    Nothing special realy.

    When I click on it and the form refreshes to the 4 kb jpg
    the time to load it is about 0.3 seconds.
    but when I click to refresh the form into a 13 kb jpg the form takes about 1 second to load the image.
    I looks as if the procedures in the form react in the same slow proportion when loading the image into the form...

  9. #9
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Faster Form (slowed down by image in it)

    Can you post JUST the form code then? We don't always need to run the code to maybe find a glitch.
    I don't live here any more.

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    Re: Faster Form (slowed down by image in it)

    Yeah,

    Why not,
    what the hack,
    just the form wich contrains the image.
    look at VeranderUiterlijk.
    That's the image loader!

    Here it is:

    (it's not pretty coding but it works fine)
    Attached Files Attached Files

  11. #11
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Faster Form (slowed down by image in it)

    Quote Originally Posted by HWijngaarD
    Yeah,

    Why not,
    what the hack,
    just the form wich contrains the image.
    look at VeranderUiterlijk.
    That's the image loader!

    Here it is:

    (it's not pretty coding but it works fine)
    Hmm. Yeah.

    You are mixing New Bitmap(...) with Bitmap.FromFile(...) in that sub. Have you tried using Fromfile() for all those calls?
    I don't live here any more.

  12. #12

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    Re: Faster Form (slowed down by image in it)

    I've tried that,

    but sorry it didn't work!

    look at the attachment:
    You see when I klik to the blue screen the form refreshes faster than
    when I load a larger image...
    If this is normal never mind, but if you know a solution to it, than be my guest!
    Attached Files Attached Files

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