Question about startup object and XP visual styles

T

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.
 
A

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top