|
-
Aug 2nd, 2001, 10:16 AM
#1
Thread Starter
Frenzied Member
Error
I'm making a webbrowser just so everyone knows....ya know..the easy stuff, and i was wondering how you would make the forward button disabled when you cant go forward.
-
Aug 2nd, 2001, 10:46 AM
#2
Lively Member
well you dont need to have thay prebuilt thing that they give you when building a browser, and you could create your own command buttons or even better is you own pictures that look good then when you can't go foward you just say:
image.enabled = false
or
command1.enabled = true
did this help?
Windows XP Professional
Microsoft Visual Basic 6.0 Professional
-
Aug 2nd, 2001, 10:55 AM
#3
Fanatic Member
Keep a collection of urls. Add/Remove the URLs to the back collection/forward collection as someone moves around. If the Count for the forward collection is 0 then disable the button.
-
Aug 2nd, 2001, 03:59 PM
#4
Thread Starter
Frenzied Member
I think i understand the count thing....um...but..i'm too stupid to figure out how to put it into code. how would you put it together?
-
Aug 2nd, 2001, 11:20 PM
#5
Fanatic Member
If you know how to use arrays, collections are pretty much the same thing. Though you may want to use arrays instead. Sorry, but at the moment, my mind is pretty much dead (close to bed time) I'll look into it tomorrow for some examples.
-
Aug 2nd, 2001, 11:33 PM
#6
Frenzied Member
Here's a great link for the WebBrowser Control.
For what you want to do, search for CommandStateChange
http://www.vbcity.com/page.asp?f=boo...bweb&p=chapter
Here's the code I'm talking about. I believe in this example CmdNavigate(0) is the "Back" button, and CmdNavigate(2) is the "Forward" button.
VB Code:
Private Sub WebBrowser1_CommandStateChange(ByVal Command As Long, _
ByVal Enable As Boolean)
If Command = 2 Then
CmdNavigate(0).Enabled = Enable
End If
If Command = 1 Then
CmdNavigate(2).Enabled = Enable
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|