Results 1 to 14 of 14

Thread: [RESOLVED] where is the error?

  1. #1

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,964

    Resolved [RESOLVED] where is the error?

    i'm using visual basic 6... i'm trying complish my sprite control in Strips section, but i don't know why i can't see the images in a usercontrol...
    in strip property page is ok, but i don't know why i can't see the subimages in a usercontrol. heres my project...
    please some one help me...
    thanks
    Last edited by joaquim; Jul 24th, 2008 at 08:00 PM.
    VB6 2D Sprite control

    To live is difficult, but we do it.

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: where is the error?

    I suspect you cannot see the images because the path you stored in the FileName property does not exist? This is a problem I told you about on another post related to same project. When I ran your project, there were no images, so I had to manually paste a path & filename into the usercontrol's FileName property. Only then did they show. Storing paths & trying to load from them is not a good idea. The project will only work if the user has the same path on their computer & also have the same images in those paths.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,964

    Re: where is the error?

    Quote Originally Posted by LaVolpe
    I suspect you cannot see the images because the path you stored in the FileName property does not exist? This is a problem I told you about on another post related to same project. When I ran your project, there were no images, so I had to manually paste a path & filename into the usercontrol's FileName property. Only then did they show. Storing paths & trying to load from them is not a good idea. The project will only work if the user has the same path on their computer & also have the same images in those paths.
    i'm sorry i was forgot... i will do it now....
    VB6 2D Sprite control

    To live is difficult, but we do it.

  4. #4

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,964

    Re: where is the error?

    now you can see the images(the images are in Imagens(it's a portuguese word) folder... but these images are in memory path(but when you open the group project you can see the images, at least i think)...
    you can't see but in teste form there is a Sprite7(i tested here the strips images)...
    if you need more information just tell me...
    thanks
    Last edited by joaquim; Jul 24th, 2008 at 08:00 PM.
    VB6 2D Sprite control

    To live is difficult, but we do it.

  5. #5
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: where is the error?

    Look at your Resize event. If Strip.Activate = True then you will only see top left corner of sprite. Change the value to False on property page and see what happens; you may have to resize sprite afterwards because changing StripActivate causes error. You have more debugging to do.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  6. #6

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,964

    Re: where is the error?

    Quote Originally Posted by LaVolpe
    Look at your Resize event. If Strip.Activate = True then you will only see top left corner of sprite. Change the value to False on property page and see what happens; you may have to resize sprite afterwards because changing StripActivate causes error. You have more debugging to do.
    thanks... more 1 thing that i forgot...
    the code woud be:

    Code:
    Private Sub UserControl_Resize()
        If Strip.Activate = False Then
            UserControl.Height = PicAnimation(0).Height
            UserControl.Width = PicAnimation(0).Width
        Else
            UserControl.Height = Strip.Height
            UserControl.Width = Strip.Width
        End If
    End Sub
    but the problem is that i continue with a little usercontrol... my mistake is the number of size?
    Last edited by joaquim; Apr 6th, 2008 at 11:36 AM.
    VB6 2D Sprite control

    To live is difficult, but we do it.

  7. #7

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,964

    Re: where is the error?

    what i need more to do? please help me...
    thanks for everying
    VB6 2D Sprite control

    To live is difficult, but we do it.

  8. #8
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: where is the error?

    Quote Originally Posted by joaquim
    what i need more to do? please help me...
    thanks for everying
    I do not understand. Please be very specific, give details and descriptions.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  9. #9

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,964

    Re: where is the error?

    Quote Originally Posted by LaVolpe
    I do not understand. Please be very specific, give details and descriptions.
    in sprite7 control(in form teste), i don't know if you teste the strip section in property page... but here if you click in button you will see some rectangules that select the subimages that i test it.... and in down you will see the animation.... until here is ok, but i try do the same way in usercontrol but i can't see the subimages.... what i use in usercontrol was more or less the same that i use in strip section in property page....
    thanks
    VB6 2D Sprite control

    To live is difficult, but we do it.

  10. #10
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: where is the error?

    Maybe not. In your resize event, you are using these 2 lines of code when Strip.Activate=True
    UserControl.Height = Strip.Height
    UserControl.Width = Strip.Width

    Well, I think you will find your Strip.Height & Strip.Width are small values.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  11. #11

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,964

    Re: where is the error?

    Quote Originally Posted by LaVolpe
    Maybe not. In your resize event, you are using these 2 lines of code when Strip.Activate=True
    UserControl.Height = Strip.Height
    UserControl.Width = Strip.Width

    Well, I think you will find your Strip.Height & Strip.Width are small values.
    i did these new changes:

    Code:
    Private Sub UserControl_Resize()
        If Strip.Activate = False Then
            UserControl.Height = PicAnimation(0).Height
            UserControl.Width = PicAnimation(0).Width
        Else
            If PicAnimation.Count > 1 Then
                UserControl.Height = PicAnimation(1).Height
                UserControl.Width = PicAnimation(1).Width
            End If
        End If
    End Sub
    but the problem is that i don't have sure if it create the pictureboxes...
    PS.: i'm sorry if i'm not sepecific... but i'm trying explain the problem...
    VB6 2D Sprite control

    To live is difficult, but we do it.

  12. #12

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,964

    Re: where is the error?

    please can someone help?
    thanks
    VB6 2D Sprite control

    To live is difficult, but we do it.

  13. #13
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: where is the error?

    Please do not bump threads. For some of the reasons, see this

  14. #14

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,964

    Re: where is the error?

    Quote Originally Posted by si_the_geek
    Please do not bump threads. For some of the reasons, see this
    you have right.... i'm sorry
    VB6 2D Sprite control

    To live is difficult, but we do it.

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