Home All Groups Group Topic Archive Search About

How to bring up a localized form when using application events

Author
13 Nov 2006 7:01 PM
Robert Dufour
In my app I was using a sub main as the startup object and this code
Curlocale = My.Settings.UserUiLanguage

System.Threading.Thread.CurrentThread.CurrentUICulture = New
CultureInfo(Curlocale)

was OK to bring my next loaded form up in english or french depending on the
setting of the Curlocale (en or fr). But now I have to use frmMain as the
startup object because I need to use the application events. So I put the
same code in the applicationstart event. That no longer brings up my UI in
french when my curlocale is fr. It stays in the default english. How can I
get my frmMain to show up in french in this case?

Thanks for any help

Bob

Author
14 Nov 2006 3:36 PM
tomb
I use a Main sub and I have no problem using the Application events.

T

Robert Dufour wrote:

Show quoteHide quote
>In my app I was using a sub main as the startup object and this code
>Curlocale = My.Settings.UserUiLanguage
>
>System.Threading.Thread.CurrentThread.CurrentUICulture = New
>CultureInfo(Curlocale)
>
>was OK to bring my next loaded form up in english or french depending on the
>setting of the Curlocale (en or fr). But now I have to use frmMain as the
>startup object because I need to use the application events. So I put the
>same code in the applicationstart event. That no longer brings up my UI in
>french when my curlocale is fr. It stays in the default english. How can I
>get my frmMain to show up in french in this case?
>
>Thanks for any help
>
>Bob
>
>

>
Author
14 Nov 2006 9:01 PM
Robert Dufour
Except that you can not use sub main in Vs2005 if you configure your
application to enable the application framework and you need to enable the
application framework if you are to use applicationevents.vb. Hence my
question, anyone know how to set startup form to use french from within
applicationstart event in applicationevents.vb
Regards
Bob
Show quoteHide quote
"tomb" <t***@technetcenter.com> wrote in message
news:usl6h.18184$U76.9663@bignews5.bellsouth.net...
>I use a Main sub and I have no problem using the Application events.
>
> T
>
> Robert Dufour wrote:
>
>>In my app I was using a sub main as the startup object and this code
>>Curlocale = My.Settings.UserUiLanguage
>>
>>System.Threading.Thread.CurrentThread.CurrentUICulture = New
>>CultureInfo(Curlocale)
>>
>>was OK to bring my next loaded form up in english or french depending on
>>the setting of the Curlocale (en or fr). But now I have to use frmMain as
>>the startup object because I need to use the application events. So I put
>>the same code in the applicationstart event. That no longer brings up my
>>UI in french when my curlocale is fr. It stays in the default english. How
>>can I get my frmMain to show up in french in this case?
>>
>>Thanks for any help
>>
>>Bob
>>
>>
>>