Print Page | Close Window

HELP Web browser & Commandstate change

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=10867
Printed Date: 09 May 2024 at 9:58am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: HELP Web browser & Commandstate change
Posted By: shipwreck
Subject: HELP Web browser & Commandstate change
Date 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



Replies:
Posted By: shipwreck
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net