473,387 Members | 1,579 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to apply changed settings from regtry to running AxWebBrowser control?

Hi,

I am using AxWebBrowser control and I met a problem. I need to browse
several different languages page. I have to change the default IE language
setting at runtime.
This can be done by change the key value of
HKEY_CURRENT_USER\Software\Microsoft\Internet
Explorer\International\AcceptLanguage. But the new setting won't apply to
the current AxWebBrowser control instance unless I close and reopen the
program or hit the OK button on IE Internet options dialog. Anyone have any
ideas on this?

Thanks very much!
Andy
Jan 23 '06 #1
3 1339
Andy,

I would use Spy++ and monitor the messages that are sent to the
webbrowser control when you make the change and hit OK to the dialog. I
would be willing to bet that a windows message is sent to all top level
windows which indicates that a change has occured. Spy++ will help you
determine what it is.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Andy Chen" <pp****@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi,

I am using AxWebBrowser control and I met a problem. I need to browse
several different languages page. I have to change the default IE language
setting at runtime.
This can be done by change the key value of
HKEY_CURRENT_USER\Software\Microsoft\Internet
Explorer\International\AcceptLanguage. But the new setting won't apply to
the current AxWebBrowser control instance unless I close and reopen the
program or hit the OK button on IE Internet options dialog. Anyone have
any ideas on this?

Thanks very much!
Andy

Jan 23 '06 #2
Thank you for your response!
I tried Spy++ on IE window and found a WM_SETTINGCHANGE message was sent to
the IE window after hitting OK button.
I used the following code to sent this message in my program (some of the
parameters are not listed):

USER32.SendMessageTimeout(pHWnd, (uint)USER32.WM_SETTINGCHANGE, pwParam,
plParam, USER32.SendMessageTimeoutFlags.SMTO_BLOCK,
5000, out pResult);

According to the descritption on MSDN for SendMessageTimeout method, this
message should be sent to all top-level window, but when I use Spy++ to
monitor one of the IE window, I found it didn't received this message. I
don't know why.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:%2****************@TK2MSFTNGP09.phx.gbl...
Andy,

I would use Spy++ and monitor the messages that are sent to the
webbrowser control when you make the change and hit OK to the dialog. I
would be willing to bet that a windows message is sent to all top level
windows which indicates that a change has occured. Spy++ will help you
determine what it is.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Andy Chen" <pp****@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi,

I am using AxWebBrowser control and I met a problem. I need to browse
several different languages page. I have to change the default IE
language setting at runtime.
This can be done by change the key value of
HKEY_CURRENT_USER\Software\Microsoft\Internet
Explorer\International\AcceptLanguage. But the new setting won't apply to
the current AxWebBrowser control instance unless I close and reopen the
program or hit the OK button on IE Internet options dialog. Anyone have
any ideas on this?

Thanks very much!
Andy


Jan 24 '06 #3
I have resolve this problem. Thank you very much!
Sorry, I made a mistake just now. I have to set the lParam to "intl" and the
SendMessageTimeoutFlags works.

"Andy Chen" <pp****@hotmail.com> wrote in message
news:OH**************@TK2MSFTNGP10.phx.gbl...
Thank you for your response!
I tried Spy++ on IE window and found a WM_SETTINGCHANGE message was sent
to the IE window after hitting OK button.
I used the following code to sent this message in my program (some of the
parameters are not listed):

USER32.SendMessageTimeout(pHWnd, (uint)USER32.WM_SETTINGCHANGE, pwParam,
plParam, USER32.SendMessageTimeoutFlags.SMTO_BLOCK,
5000, out pResult);

According to the descritption on MSDN for SendMessageTimeout method, this
message should be sent to all top-level window, but when I use Spy++ to
monitor one of the IE window, I found it didn't received this message. I
don't know why.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:%2****************@TK2MSFTNGP09.phx.gbl...
Andy,

I would use Spy++ and monitor the messages that are sent to the
webbrowser control when you make the change and hit OK to the dialog. I
would be willing to bet that a windows message is sent to all top level
windows which indicates that a change has occured. Spy++ will help you
determine what it is.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Andy Chen" <pp****@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi,

I am using AxWebBrowser control and I met a problem. I need to browse
several different languages page. I have to change the default IE
language setting at runtime.
This can be done by change the key value of
HKEY_CURRENT_USER\Software\Microsoft\Internet
Explorer\International\AcceptLanguage. But the new setting won't apply
to the current AxWebBrowser control instance unless I close and reopen
the program or hit the OK button on IE Internet options dialog. Anyone
have any ideas on this?

Thanks very much!
Andy



Jan 24 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: TF | last post by:
hi, i am using AxWebBrowser control in my C# dot.net windows application. i want to display a web page in the browser that needs some data sent to it through HTML Form 'POST' method. I saw a...
4
by: Randy | last post by:
Hi, ok, I found a way to connect to a running instance of an (external) Internet Explorer and access - for example - the html source. That works fine! But now I have running application with...
0
by: beau | last post by:
Hi, I'm using the AxWebBrowser in a C# WinForms application. I've got the basics working, but need some help controlling the view options for browsing files. How can I disable the...
3
by: Clint MacDonald | last post by:
I have used the AxWebBrowser in a Visual Basic Project... I found that both Framework 1.0 and 1.1 had to be installed for it to work properly. I now have found that in Studio 2003, that the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.