Print Page | Close Window

Web browser focus is not fired (v12.0.2)

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: General Discussion
Forum Description: Topics Related to Active-X COM Development in General
URL: http://forum.codejock.com/forum_posts.asp?TID=12043
Printed Date: 23 September 2024 at 5:51am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Web browser focus is not fired (v12.0.2)
Posted By: Michael122
Subject: Web browser focus is not fired (v12.0.2)
Date Posted: 02 September 2008 at 4:23am
Hello colleague!

Please help me - I have a problem with Xtreme Suite tools v12.0.2 (ActiveX)!

The problem:
I have a frame around the Web browser (similar Outlook).

If the focus comes on the Webbrowser COntrol, the frame is to become blue.
(Works to v12.0.1 very well!)

Yesterday I brought V12.0.2 in and was not any longer fired the focus (LostFocus, GotFocus)!

How can I change that again?

Thank you for each assistance!

Michl
(Sorry, my English is not good.)



Replies:
Posted By: Michael122
Date Posted: 09 September 2008 at 4:50am
Can nobody help me?

I have code in the 'GotFocus' and 'Lostfocus' in the Web control.
Since the version 12.0.2 this code is not any longer fired.

Why?

How can I solve the problem?

Michl
(sorry, my English is not good)


Posted By: Jean
Date Posted: 15 September 2008 at 5:06am
A frame that change the color to blue? Do you use DockingPanes?

If so, try to initialize the WebBrowser control by navigating somewhere (e.g. WebBrowser.Navigate "about:blank") before you put the Form/PictureBox to the pane.


-------------
Product: Xtreme SuitePro (ActiveX) Version 15.0.2
Platform: Windows XP (32bit) German - SP 2
Language: VB6 / C# 4.0


Posted By: Oleg
Date Posted: 15 September 2008 at 6:15am

Hi,

There was no any changes in WebBrowser code between 12.0.1 and 12.0.2. Check maybe parent of WebBrowser changed or something in your code.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Michael122
Date Posted: 18 September 2008 at 3:32am
Hello friends,

Forgive me please, I explained that probably wrongly.
(my bad English...)

See picture: I set the Internet-Control with a VB6 Shape Control.

- If the Internet control receives the focus, then the VB6 Shape control frame becomes blue.
- If the Internet control loses the focus, the frame (VB6 Shape) becomes
again grey.

To version 12.0.1 functioned very well.

Since version 12.0.2 the focus is not any longer fired.

Why does no Got- and Lost focus more?

Greeting
Michl



Posted By: Lodep59
Date Posted: 02 October 2008 at 2:47am
Hi,
 
Don't know for 12.0.1 but in 12.0.2 it's the same behaviour than the Ms WebBrowser.
 
The "gotfocus" event is not fired when you click on the web page. But if you use the "tab" key to move from controls to webbrowser the event is fired.
 
Think it's because the webbrowser don't have the focus. In fact the focus is in the web document loaded in the wb.
 
A solution : Add this in the declaration of the form :
 
Private WithEvents MyDoc As HTMLDocument
 
And in the code :
 
Private Sub MyDoc_onfocusin()
    MsgBox "Doc Focus"
End Sub
 
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
    Set MyDoc = Me.WebBrowser1.Document
End Sub

Don't forget to replace WebBrowser1 by the name of your WB control.
For information you'll probably need to add the "Microsoft HTML Library" reference.
 
Hope this help.
 



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