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...
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"
Re: Simple browser argument won't work?
lol well yeah I considered that obviously :D 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!
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.
Re: Simple browser argument won't work?
Quote:
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
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! :D Last forum told me to get lost in a rather rude way!
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! :wave: :thumb: