Click here to Skip to main content
15,919,931 members
Home / Discussions / C#
   

C#

 
GeneralRe: fileListBox Pin
miracle_monster29-Nov-04 18:00
miracle_monster29-Nov-04 18:00 
GeneralRe: fileListBox Pin
miracle_monster29-Nov-04 18:26
miracle_monster29-Nov-04 18:26 
GeneralMaximize your web form Pin
Sled Dog28-Nov-04 18:06
Sled Dog28-Nov-04 18:06 
GeneralRe: Maximize your web form Pin
Heath Stewart28-Nov-04 21:37
protectorHeath Stewart28-Nov-04 21:37 
GeneralUsing SortedList to store my own struct Pin
jborden28-Nov-04 17:16
jborden28-Nov-04 17:16 
GeneralRe: Using SortedList to store my own struct Pin
Nick Parker28-Nov-04 17:34
protectorNick Parker28-Nov-04 17:34 
GeneralFocus Problem!! Pin
Moon Boy28-Nov-04 17:13
Moon Boy28-Nov-04 17:13 
GeneralRe: Focus Problem!! Pin
Heath Stewart28-Nov-04 21:31
protectorHeath Stewart28-Nov-04 21:31 
The WebBrowser control - an ActiveX control that is hosted through an RCW, or Runtime-Callable Wrapper - is subject to its own focus handling. Either the AxHost (the base class for the AxWebBrowser class) has the focus or it doesn't, but how the WebBrowser control itself maintains focus is completely independent of .NET. IT could, for example, have the focus while the AxHost doesn't even realize it has the focus. This is a common problem (not just with the WebBrowser control, but with all ActiveX controls hosted in .NET).

Once way of solving the problem is to get the handle of the currently active window before you refresh the WebBrowser and then restore it. For this, you'll need to P/Invoke the native GetForegroundWindow and SetForegroundWindow APIs. If you need help declaring the P/Invoke signatures, see http://pinvoke.net[^].

To solve the problem with the WebBrowser control itself, you either need to correctly identify the container (this gets deep into COM interfaces, so experience in this area is helpful; there are some articles on this site that may help if you search for "WebBrowser", for example) or to make sure that the WebBrowser control never takes the focus to begin with. One way - and this is untested but should work - is to set the WebBrowser.Visible property (not the inheritted AxHost.Visible property!) to false. IF correctly implemented, the control should not try to steal the focus if it is not even visible.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralBack propogation (AI)needed Pin
kasimalla28-Nov-04 17:00
kasimalla28-Nov-04 17:00 
GeneralRe: Back propogation needed Pin
Heath Stewart28-Nov-04 21:22
protectorHeath Stewart28-Nov-04 21:22 
GeneralRe: Back propogation needed Pin
J4amieC29-Nov-04 0:55
J4amieC29-Nov-04 0:55 
GeneralRe: Back propogation needed Pin
tom_dx29-Nov-04 1:30
tom_dx29-Nov-04 1:30 
GeneralAuto-Hide as in VS.Net 2003 control. Pin
stan2828-Nov-04 16:20
stan2828-Nov-04 16:20 
QuestionWord cutting (not English) ? Pin
god4k28-Nov-04 15:48
god4k28-Nov-04 15:48 
AnswerRe: Word cutting (not English) ? Pin
Heath Stewart28-Nov-04 21:20
protectorHeath Stewart28-Nov-04 21:20 
QuestionAnyone knows where can I get MSDN for VS2003? Pin
denniskang200428-Nov-04 15:38
denniskang200428-Nov-04 15:38 
AnswerRe: Anyone knows where can I get MSDN for VS2003? Pin
Heath Stewart28-Nov-04 21:18
protectorHeath Stewart28-Nov-04 21:18 
Generalhelp with simple file io Pin
tom_dx28-Nov-04 14:39
tom_dx28-Nov-04 14:39 
GeneralRe: help with simple file io Pin
Robin Panther28-Nov-04 16:17
Robin Panther28-Nov-04 16:17 
GeneralRe: help with simple file io Pin
tom_dx29-Nov-04 1:29
tom_dx29-Nov-04 1:29 
GeneralAsync web services and exceptions Pin
dabs28-Nov-04 14:20
dabs28-Nov-04 14:20 
GeneralRe: Async web services and exceptions Pin
Heath Stewart28-Nov-04 21:11
protectorHeath Stewart28-Nov-04 21:11 
GeneralRe: Async web services and exceptions Pin
dabs29-Nov-04 0:47
dabs29-Nov-04 0:47 
GeneralRe: Async web services and exceptions Pin
Heath Stewart29-Nov-04 7:30
protectorHeath Stewart29-Nov-04 7:30 
GeneralRe: Async web services and exceptions Pin
Daniel Turini28-Nov-04 22:23
Daniel Turini28-Nov-04 22:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.