Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Browser Control History
Message
From
05/12/2001 10:34:32
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00589774
Message ID:
00589851
Views:
32
This message has been marked as a message which has helped to the initial question of the thread.
>>Hmmm...I think it would be like this:
>>
>>
Private Sub WebBrowser_CommandStateChange(ByVal Command As Long, ByVal Enable As Boolean)
>>  Select Case Command
>>    Case CSC_NAVIGATEBACK
>>      Back.Enabled = Enable    && Back is a button class
>>    Case CSC_NAVIGATEFORWARD
>>      Forward.Enabled = Enable   && Forward is a button class
>>  End Select
>>End Sub
No line continuations in VB.
>
>Yeah, but what would it be in VFP code? The browser control does have a CommandStateChange method that you can call, but there are no parameters for it. So once you navigate somewhere, it always returns true.

It should be:
  Do Case
    Case command = 2
      thisform.cmdBack.Enabled = enable
    Case command = 1
      thisform.cmdfwd.Enabled = enable
  EndCase
Where cmdBack and cmdFwd are your back and forward buttons. And assuming the event fires on navigation.
Previous
Reply
Map
View

Click here to load this message in the networking platform