Results 1 to 7 of 7

Thread: Simple browser argument won't work? (Resolved!)

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2005
    Posts
    4

    Simple browser argument won't work? (Resolved!)

    I'm using this code for a simple argument to cycle through 2 pictures via browser in VB5:

    Private Sub PicCycle()
    If wbrRosePics.LocationName = ("dr001.html") Then
    wbrRosePics.Navigate "\bin\pictures\dr002.html"
    LblPic.Caption = "2"
    ElseIf wbrRosePics.LocationName = ("dr002.html") Then
    wbrRosePics.Navigate "\bin\pictures\dr001.html"
    LblPic.Caption = "1"
    End If

    This works on my computer, however it doesn't seem to work on anyone elses or any of my other computers. I have a button that calls PicCycle, but, as I said, it doesn't do anything on anyone elses computer.

    The only thing I've found in-common with my friend's computer and my old computers is that the SHDOCVW.dll file is a little bit out of date, while mine is the lastest version available. Is this the problem? If so, how would I go about getting people an updated copy of that file, as it is almost always in use.

    Or is there an easier way for me to cycle through my pictures?

    I appreciate any help...
    Last edited by violethue; Jan 16th, 2005 at 12:29 AM.

  2. #2
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    879

    Re: Simple browser argument won't work?

    have u concidered the fact that only your computer has \bin\pictures\dr002.html while mine doesn't :P. Include the full path or use the internet. The thing is, \bin\pictures\dr002.html translates to C:\bin\pictures\dr002.html, which most likely doesn't exist for anyone! If that directory is shipped with your program, then do the following APP.PATH & "\bin\pictures\dr002.html"
    Visual Basic 6.0
    Visual C++ 5
    Delphi 5


  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2005
    Posts
    4

    Re: Simple browser argument won't work?

    lol well yeah I considered that obviously I'm making the program to be put on a CD, so it'll be exactly as it is on the cd, the drive:\bin\etc

    I tried the app.path & you just suggested, it still obviously works fine with me but my friend says it won't work with them. I've made an entirely separate program to test this stuff and it still still still STILL doesn't work. It's got to be something simple I'm not getting.

    Everything shows up fine, like pictures and pages, I think if there was a linking problem it would say page not found or action cancelled considering it's a browser but I don't even get that... It just sits there at dr001.

    It doesn't seem to work on my other computer either. Sigh!

  4. #4
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    879

    Re: Simple browser argument won't work?

    wbrRosePics.LocationName = ("dr001.html") <-- btw, that's a bad VB arguement. Remove the brackets. That might work when you run the program from the IDE, but it might not when u compile the program or on other VB pc's. Make sure they have VB 6 runtimes.
    Visual Basic 6.0
    Visual C++ 5
    Delphi 5


  5. #5
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Simple browser argument won't work?

    It just sits there at dr001.
    what do you mean by this?

    that you can't see the program doing anything, or that you are stepping through the code to this point??

    rgds pete

  6. #6

    Thread Starter
    New Member
    Join Date
    Jan 2005
    Posts
    4

    Re: Simple browser argument won't work?

    I tried it with and without the brackets, either way it doesn't work.

    As for what I meant by sitting here: When I compile it and give it to a friend or use it on another computer, it doesn't seem to do anything when I click the button, just stays on the default picture (dr001). Both computers have visual basic 6 runtimes, but I'm coding in VB5 so I don't think it should matter... ?

    I appreciate your trying to help! Last forum told me to get lost in a rather rude way!

  7. #7

    Thread Starter
    New Member
    Join Date
    Jan 2005
    Posts
    4

    Re: Simple browser argument won't work?

    Ah! I found a fix:

    Private Sub PicCycle()
    If LblPic.Caption = "1" Then
    wbrRosePics.Navigate "\bin\pictures\dr002.html"
    LblPic.Caption = "2"
    ElseIf LblPic.Caption = "2" Then
    wbrRosePics.Navigate "\bin\pictures\dr001.html"
    LblPic.Caption = "1"
    End If
    End Sub
    Private Sub Form_Load()
    wbrRosePics.Navigate "\bin\pictures\dr001.html"
    LblPic.Caption = "1"
    End Sub

    LblPic can be invisible but I made it visible since it's part of how it works. This works on my old computer and I bet it'll work on my friend's computer as well.

    Thanks for your help guys!

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