![]()  | 
 
HELP Web browser & Commandstate change | 
 
    Post Reply  
   | 
  
| Author | |
   
   shipwreck  
   
   Senior Member  
   Joined: 18 April 2008 Location: United States Status: Offline Points: 308  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: HELP Web browser & Commandstate changePosted: 02 June 2008 at 1:54am  | 
 
| 
   
    Alright folks, I'm pretty sure I'm posting this in the right section. Anywho, I'm in a tight spot. As mentioned in my last posts, I've been working on a tabbed web browser in vb6 that happens to be functioning quite nicely. 
However, There's a problem. I cant seem to get my "Back" & "Forward" buttons to enable and disable themselves. Now, I can do this with the normal Web browser control, or on a SDI form. But, my browser is MDI based, and my web browser control is on the child forms, while my "Toolbar" is on the MDI Parent. 
Now, I know this is supposed to be done in the WebBrowser_Commandstatechange() Event. But, I have NO IDEA what code to use here? 
Anyone have any ideas? Please?..anyone?  
![]() I'm using version 12.0 of the suite controls. in Windows MCE 2005 SP3. (VB6) 
Thanks and reguards. 
    | 
 |
| 
   
     
     Product: Xtreme Suite Pro (Active-X), Version 15.3.1 
   
  Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit) Language: Visual Basic 6.0 SP6  | 
 |
![]()  | 
 |
   
   shipwreck  
   
   Senior Member  
   Joined: 18 April 2008 Location: United States Status: Offline Points: 308  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 02 June 2008 at 3:06am | 
 
| 
   
    
   Alright folks, I figured this one out by myself! Woohoo! The code I used is:
 
   
  Private Sub WebBrowser_CommandStateChange(ByVal Command As Long, ByVal Enable As Boolean) 
DoEvents: DoEvents: DoEvents 
If Enable = True And Command = 2 Then         frmMain.CommandBars.FindControl(xtpControlButton, ID_BROWSER_BACK).Enabled = True 
ElseIf Enable = False And Command = 2 Then         frmMain.CommandBars.FindControl(xtpControlButton, ID_BROWSER_BACK).Enabled = False 
    End If 
End Sub Thanks but no thanks.  
   ![]()  | 
 |
| 
   
     
     Product: Xtreme Suite Pro (Active-X), Version 15.3.1 
   
  Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit) Language: Visual Basic 6.0 SP6  | 
 |
![]()  | 
 |
    Post Reply  
   | 
  |
|       
  
  Tweet   	
    | 
 
| Forum Jump | Forum Permissions  ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum  |