VB 2005 Visual Styles problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • nkarnold@googlemail.com

    #1

    VB 2005 Visual Styles problem

    My application seems to be ignoring Enable XP visual styles, which is
    ticked on in the application properties.

    the Toolbar and Menubar, which appear the nice looking shaded blue
    appear like that whilst in the IDE, but when I run the app, they both
    go to boring grey.

    In the application.des igner.vb self generated file, it does have
    PublicSubNew()
    MyBase.New(Glob al.Microsoft.Vi sualBasic.Appli cationServices. Authent
    icationMode.Win dows)
    Me.IsSingleInst ance = false
    Me.EnableVisual Styles = true
    Me.SaveMySettin gsOnExit = true
    Me.ShutDownStyl e =
    Global.Microsof t.VisualBasic.A pplicationServi ces.Shutdow
    nMode.AfterMain FormCloses
    EndSub

    If i create a brand new application, just as a test and drop the two
    controls into that, they appear with visual styles.

    So it looks like its something to do with my project, but i can't find
    out where or why.

    any help appreciated.

    Cheers

    Nig

  • Patrice

    #2
    Re: VB 2005 Visual Styles problem

    In your test application what are the controls you tried ? In particular
    make sure you don't confuse menubar,toolbar with menustrip/toolstrip...

    --
    Patrice

    <nkarnold@googl email.coma écrit dans le message de news:
    1155906111.5024 15.243460@h48g2 00...legr oups.com...
    My application seems to be ignoring Enable XP visual styles, which is
    ticked on in the application properties.
    >
    the Toolbar and Menubar, which appear the nice looking shaded blue
    appear like that whilst in the IDE, but when I run the app, they both
    go to boring grey.
    >
    In the application.des igner.vb self generated file, it does have
    PublicSubNew()
    MyBase.New(Glob al.Microsoft.Vi sualBasic.Appli cationServices. Authent
    icationMode.Win dows)
    Me.IsSingleInst ance = false
    Me.EnableVisual Styles = true
    Me.SaveMySettin gsOnExit = true
    Me.ShutDownStyl e =
    Global.Microsof t.VisualBasic.A pplicationServi ces.Shutdow
    nMode.AfterMain FormCloses
    EndSub
    >
    If i create a brand new application, just as a test and drop the two
    controls into that, they appear with visual styles.
    >
    So it looks like its something to do with my project, but i can't find
    out where or why.
    >
    any help appreciated.
    >
    Cheers
    >
    Nig
    >

    Comment

    • tommaso.gastaldi@uniroma1.it

      #3
      Re: VB 2005 Visual Styles problem

      If you change the Start up form, does the error go away?

      Tommaso

      nkarnold@google mail.com ha scritto:
      My application seems to be ignoring Enable XP visual styles, which is
      ticked on in the application properties.
      >
      the Toolbar and Menubar, which appear the nice looking shaded blue
      appear like that whilst in the IDE, but when I run the app, they both
      go to boring grey.
      >
      In the application.des igner.vb self generated file, it does have
      PublicSubNew()
      MyBase.New(Glob al.Microsoft.Vi sualBasic.Appli cationServices. Authent
      icationMode.Win dows)
      Me.IsSingleInst ance = false
      Me.EnableVisual Styles = true
      Me.SaveMySettin gsOnExit = true
      Me.ShutDownStyl e =
      Global.Microsof t.VisualBasic.A pplicationServi ces.Shutdow
      nMode.AfterMain FormCloses
      EndSub
      >
      If i create a brand new application, just as a test and drop the two
      controls into that, they appear with visual styles.
      >
      So it looks like its something to do with my project, but i can't find
      out where or why.
      >
      any help appreciated.
      >
      Cheers
      >
      Nig

      Comment

      • gene kelley

        #4
        Re: VB 2005 Visual Styles problem

        On 18 Aug 2006 06:01:51 -0700, nkarnold@google mail.com wrote:
        >My application seems to be ignoring Enable XP visual styles, which is
        >ticked on in the application properties.
        >
        >the Toolbar and Menubar, which appear the nice looking shaded blue
        >appear like that whilst in the IDE, but when I run the app, they both
        >go to boring grey.
        >
        >In the application.des igner.vb self generated file, it does have
        >PublicSubNew ()
        >MyBase.New(Glo bal.Microsoft.V isualBasic.Appl icationServices .Authent
        >icationMode.Wi ndows)
        >Me.IsSingleIns tance = false
        >Me.EnableVisua lStyles = true
        >Me.SaveMySetti ngsOnExit = true
        >Me.ShutDownSty le =
        >Global.Microso ft.VisualBasic. ApplicationServ ices.Shutdow
        >nMode.AfterMai nFormCloses
        >EndSub
        >
        >If i create a brand new application, just as a test and drop the two
        >controls into that, they appear with visual styles.
        >
        >So it looks like its something to do with my project, but i can't find
        >out where or why.
        >
        >any help appreciated.
        >
        >Cheers
        >
        >Nig
        "Shaded Blue" implies to me, a blue gradient. If that's the case, I'm curious as to what default
        condition produces a blue gradient in design.

        The most common way to reproduce what you desescribe if there is a default gradient on a toolstrip
        in design is a line of code at runtime that references the ToolStrip's BackColor property. With
        VisualStyles, for the default gradient to display, the BackColor is Nothing, not
        SystemColors.Co ntrol which is usually grey in most cases.

        Gene

        Comment

        Working...