From: JB on 1 Jun 2010 17:55 Hi 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
From: Armin Zingler on 1 Jun 2010 18:54 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. -- Armin
From: JB on 1 Jun 2010 19:53 On 1 June, 15:54, Armin Zingler <az.nos...(a)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. > > -- > Armin Hi Armin, That's what I do. I call System.Windows.Forms.Application.EnableVisualStyles() from the Application.Startup. And it doesn't work. JB
From: Armin Zingler on 1 Jun 2010 21:24 Am 02.06.2010 01:53, schrieb JB: > On 1 June, 15:54, Armin Zingler <az.nos...(a)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
From: JB on 2 Jun 2010 10:36 On 1 June, 18:24, Armin Zingler <az.nos...(a)freenet.de> wrote: > Am 02.06.2010 01:53, schrieb JB: > > > On 1 June, 15:54, Armin Zingler <az.nos...(a)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 Hi 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
|
Pages: 1 Prev: Calling unmanaged C dll from managed code Next: Help converting a vb6 function to vbnet. |