Application.EnableVisualStyles and no image in Tab control

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • #ROBERT

    Application.EnableVisualStyles and no image in Tab control

    (VS 2003 + .NET Framework 1.1 + WinXP Pro SP2)

    Calling Application.Ena bleVisualStyles () after the initialization( ) removes
    all images in the tab control (in the tab headers I mean). Without visual
    styles enabled, I have no
    problem. What is wrong and what is the solution?
    (PS: Using a manifest file makes no trouble. just the function :
    Application.Ena bleVisualStyles () )

    Thanks for any help.





  • Herfried K. Wagner [MVP]

    #2
    Re: Application.Ena bleVisualStyles and no image in Tab control

    "#ROBERT" <rodfif@mailfsf .com> schrieb:[color=blue]
    > Calling Application.Ena bleVisualStyles () after the initialization( )
    > removes
    > all images in the tab control (in the tab headers I mean). Without visual
    > styles enabled, I have no
    > problem. What is wrong and what is the solution?[/color]

    Call 'Application.Do Events' directly after calling 'EnableVisualSt yles'.

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://classicvb.org/petition/>

    Comment

    • #ROBERT

      #3
      Re: Application.Ena bleVisualStyles and no image in Tab control

      No way... it is just the same.
      ---------------
      "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
      news:evk2dxLKFH A.2728@TK2MSFTN GP10.phx.gbl...[color=blue]
      > "#ROBERT" <rodfif@mailfsf .com> schrieb:[color=green]
      >> Calling Application.Ena bleVisualStyles () after the initialization( )
      >> removes
      >> all images in the tab control (in the tab headers I mean). Without visual
      >> styles enabled, I have no
      >> problem. What is wrong and what is the solution?[/color]
      >
      > Call 'Application.Do Events' directly after calling 'EnableVisualSt yles'.
      >
      > --
      > M S Herfried K. Wagner
      > M V P <URL:http://dotnet.mvps.org/>
      > V B <URL:http://classicvb.org/petition/>[/color]


      Comment

      • Rodger Constandse

        #4
        Re: Application.Ena bleVisualStyles and no image in Tab control

        I've experienced a lot of weird problems using EnableVisualSty les (with or
        without calling DoEvents afterwards), including a mysterious
        'System.Runtime .InteropService s.SEHException' exception.

        Just use the manifest file.

        --
        Rodger Constandse

        <http://www.SequenceDia gramEditor.com>
        Sequence Diagram Editor - A quick and easy way to draw and edit sequence diagrams

        #ROBERT wrote:
        [color=blue]
        > (VS 2003 + .NET Framework 1.1 + WinXP Pro SP2)
        >
        > Calling Application.Ena bleVisualStyles () after the initialization( ) removes
        > all images in the tab control (in the tab headers I mean). Without visual
        > styles enabled, I have no
        > problem. What is wrong and what is the solution?
        > (PS: Using a manifest file makes no trouble. just the function :
        > Application.Ena bleVisualStyles () )
        >
        > Thanks for any help.
        >
        >
        >
        >
        >[/color]

        Comment

        • Mick Doherty

          #5
          Re: Application.Ena bleVisualStyles and no image in Tab control

          Application.Ena bleVisualStyles and Application.DoE vents must be called in
          Sub Main(), not Sub New()

          i.e.
          \\\
          Shared Sub Main
          Application.Ena bleVisualStyles
          Application.DoE vents
          Application.Run (New Form1)
          End Sub
          ///

          Alternatively, populate the imagelist during or after form load, or add a
          manifest resource to the exe after you have built it.

          --
          Mick Doherty
          Dotnetrix offers Nothing. Standard and Premium versions available.



          "#ROBERT" <rodfif@mailfsf .com> wrote in message
          news:OFg0EJMKFH A.3916@TK2MSFTN GP14.phx.gbl...[color=blue]
          > No way... it is just the same.
          > ---------------
          > "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
          > news:evk2dxLKFH A.2728@TK2MSFTN GP10.phx.gbl...[color=green]
          >> "#ROBERT" <rodfif@mailfsf .com> schrieb:[color=darkred]
          >>> Calling Application.Ena bleVisualStyles () after the initialization( )
          >>> removes
          >>> all images in the tab control (in the tab headers I mean). Without
          >>> visual styles enabled, I have no
          >>> problem. What is wrong and what is the solution?[/color]
          >>
          >> Call 'Application.Do Events' directly after calling 'EnableVisualSt yles'.
          >>
          >> --
          >> M S Herfried K. Wagner
          >> M V P <URL:http://dotnet.mvps.org/>
          >> V B <URL:http://classicvb.org/petition/>[/color]
          >
          >[/color]


          Comment

          Working...