Question about startup object and XP visual styles

Question about startup object and XP visual styles

am 20.01.2008 11:48:08 von Tom Rahav

Dear all,

I develp a win-form application using VB.NET 2005 and I want its startup
object to be a main(...) sub insteas of a form (the reason is that I need to
transfer arguments to the application and then decide what form to show).
In order to allow this I unchecked the "Enable application framework"
checkbox in the project properies and changed the Startup Object to the
main(...) procedure. The problem is that by that I'm losing the option to
set the "XP visual style".
How can I combine both? I mean to be able to start the application from a
procedure (rather than a form) and to keep the XP style GUI?

Thanks,
Tom.

RE: Question about startup object and XP visual styles

am 20.01.2008 19:47:00 von AMercer

> How can I combine both? I mean to be able to start the application from a
> procedure (rather than a form) and to keep the XP style GUI?

In sub main, before you start any forms, call

System.Windows.Forms.Application.EnableVisualStyles