471,350 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 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 1278
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 discussion thread is closed

Replies have been disabled for this discussion.

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.