|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Enable Visual Styles after application has startedHi All,
I want to dynamically change the Application.EnableVisualStyles flag. I have an application that uses a startup form (.Net Framework 2.0) and if I set the EnableVisualStyles in the Application.Startup event it doesn't work. The only way it works is if I set this flag at design time in the Application properties. Any suggestions on how I can change this flag dynamically without using Sub Main()? Thanks JB Am 01.06.2010 23:55, schrieb JB:
> Hi All, My IDE is not able to correctly find 'EnableVisualStyles' (one of the> > I want to dynamically change the Application.EnableVisualStyles flag. > I have an application that uses a startup form (.Net Framework 2.0) > and if I set the EnableVisualStyles in the Application.Startup event > it doesn't work. > The only way it works is if I set this flag at design time in the > Application properties. > Any suggestions on how I can change this flag dynamically without > using Sub Main()? My.Crap issues), but you can try to set the property to False in the project's properties and, in addition, conditionally call System.Windows.Forms.Application.EnableVisualStyles(). -- Armin Am 02.06.2010 00:39, schrieb Armin Zingler:
> ... in addition, conditionally call I mean, call it from the Application.Startup event handler.> System.Windows.Forms.Application.EnableVisualStyles(). -- Armin On 1 June, 15:54, Armin Zingler <az.nos***@freenet.de> wrote:
> Am 02.06.2010 00:39, schrieb Armin Zingler: Hi Armin,> > > ... in addition, conditionally call > > System.Windows.Forms.Application.EnableVisualStyles(). > > I mean, call it from the Application.Startup event handler. > > -- > Armin That's what I do. I call System.Windows.Forms.Application.EnableVisualStyles() from the Application.Startup. And it doesn't work. JB Am 02.06.2010 01:53, schrieb JB:
> On 1 June, 15:54, Armin Zingler <az.nos***@freenet.de> wrote: Ok. You wrote "Application.EnableVisualStyles flag". Therefore I thought>> Am 02.06.2010 00:39, schrieb Armin Zingler: >> >>> ... in addition, conditionally call >>> System.Windows.Forms.Application.EnableVisualStyles(). >> >> I mean, call it from the Application.Startup event handler. >> > > That's what I do. you meant Application.EnableVisualStyles = True/False which sets the property Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.EnableVisualStyles. > I call I've tried it and it did work. Don't know what's different.> System.Windows.Forms.Application.EnableVisualStyles() from the > Application.Startup. And it doesn't work. I haven't tried it with a Splash Screen. .... Now I did but it doesn't make a difference. -- Armin On 1 June, 18:24, Armin Zingler <az.nos***@freenet.de> wrote:
Show quoteHide quote > Am 02.06.2010 01:53, schrieb JB: Hi Armin,> > > On 1 June, 15:54, Armin Zingler <az.nos***@freenet.de> wrote: > >> Am 02.06.2010 00:39, schrieb Armin Zingler: > > >>> ... in addition, conditionally call > >>> System.Windows.Forms.Application.EnableVisualStyles(). > > >> I mean, call it from the Application.Startup event handler. > > > That's what I do. > > Ok. You wrote "Application.EnableVisualStyles flag". Therefore I thought > you meant > > Application.EnableVisualStyles = True/False > > which sets the property > Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.EnableVisualStyles. > > > I call > > System.Windows.Forms.Application.EnableVisualStyles() from the > > Application.Startup. And it doesn't work. > > I've tried it and it did work. Don't know what's different. > I haven't tried it with a Splash Screen. .... Now I did but it doesn't > make a difference. > > -- > Armin Sorry my mistake, I didn't read your post correctly. I used System.Windows.Forms.Application.EnableVisualStyles() as you suggested and it works perfectly. Thank you very much. JB
Calling unmanaged C dll from managed code
Direct Client Requirement - Software Engineer (.Net) - VA - Chantilly (GC and Citizen may only apply vb.net congiguration settings vb.net share data Passing Values between forms Add new event manually to a control of mine. Encryption and Decryption with office 2007 document Convert from network name to ip address How do I copy file from resources to C:\Notes? make a dll |
|||||||||||||||||||||||