Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - HELP Web browser & Commandstate change
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

HELP Web browser & Commandstate change

 Post Reply Post Reply
Author
Message
shipwreck View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 April 2008
Location: United States
Status: Offline
Points: 308
Post Options Post Options   Thanks (0) Thanks(0)   Quote shipwreck Quote  Post ReplyReply Direct Link To This Post Topic: HELP Web browser & Commandstate change
    Posted: 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
Back to Top
shipwreck View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 April 2008
Location: United States
Status: Offline
Points: 308
Post Options Post Options   Thanks (0) Thanks(0)   Quote shipwreck Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.