Results 1 to 5 of 5

Thread: So Close (VB6)

  1. #1
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    So Close (VB6)

    I've attached my project in the hope that a litle advice will point me in the right direction.
    I have a stumbling block which is buuging me.

    Similar to my project of last week with PDF's but this time multiple JPG's.
    In the forms text "txtEst" is a value of 12345 for testing purposes, pressing the ticked command button fills the thumbnails, in my case 9.
    If I change the txtEst to 12346 which I have 2 images in C:BICimage, the images load in the first two image controls but images of 12345 are still populated
    in the controls also.
    Any help onthis would be appreciated.
    Any other comments on any of the project would also be a help.
    The form is raw at the moment, so please ignore any visual problems which I can iron out later.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: So Close (VB6)

    Try clearing all the images as the first thing you do in the button code before you start repopulating them.
    Charlotte

  3. #3
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: So Close (VB6)

    Charlotte.

    I tried this by inserting imgDel before the declarations and it didn't work.
    Or maybe I've missed something along the way.
    This was the very reason I created the function imgDel. If it works over with you please let me know, but for now, I've stared at it so long.
    I'm trying to do this in steps and learn as I go.

    The more I plough into it, the more unsure if I've made a mistake, so any pointers on the existing code is appreciated.

    One thing which I have found very useful, strange as it seems, the lack of properties as opposed to what I'm used ti in Access.
    It's made me look at ways in code to manipulate the functuality in different ways.

    Have a good weekend and thanks for replying.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: So Close (VB6)

    Dave,

    Try this version of imgDel:

    Private Function imgDel()
    Dim I As Integer
    For I = 1 To MaxNumberOfImages
    Me.Controls("Text" & I).Text = ""
    Me.Controls("img" & I).Picture = LoadPicture()
    Next
    Me.PreviewImg.Picture = LoadPicture()
    Me.txtInfo.Text = "No Current Images"
    End Function

    and insert a line with imgDel at the start of the FillImages procedure.

  5. #5
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: So Close (VB6)

    Hans
    As ever, perfect solution.

Posting Permissions

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