Imagebutton image

Discussion in 'Questions (Windows Mobile)' started by stevefan, Jul 30, 2009.

  1. stevefan

    stevefan Member Licensed User

    I am using 22 image buttons on a form, all identical images. However it takes 8 seconds or so on my X800 glofiish using the optimized compiler 6.8 with autoscale. Sometimes I need to change the images to different ones, and the 8 seconds is too much. Any suggestions to achieve the same result more quickly?

    stevefan
     

    Attached Files:

  2. Ariel_Z

    Ariel_Z Active Member Licensed User

    The picture file is missing, but you can try
    Code:
    Sub Globals
       
    'Declare the global variables here.

    End Sub

    Sub App_Start
       Form1.Show
       
    For i=0 To 10
          AddImageButton(
    "form1","ib"&i,10,10+i*15,15,15,"")
       
    Next
       ib1.image = 
    "shirt.gif"
       
    For i=0 To 10
          
    Control("ib"&i).image=ib1.image
       
    Next
       
    End Sub
    And see if it's faster. This way it will not load the file each time.
     
  3. stevefan

    stevefan Member Licensed User

    That did the trick. Much faster. Thanks!

    Steve
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice