Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Form loses xp theme with WebBrowser object

Form loses xp theme with WebBrowser object

Scheduled Pinned Locked Moved Visual Basic
helpquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    carlos_rocha
    wrote on last edited by
    #1

    Hi! I Have a form with several objects with the XP theme (Application.EnableVisualStyles()) and When i add a WebBrowser object all the previous objects are showed with the normal appearence. Does anyone know anything about this? I've read that the webBrowser object isn't "themeble" but it seems to be affecting my app. If i launch a new form from the first form (and the first form doesn't possess a webBrowser object) with several objects and a webBrowser object then, in the new form all the objects(but the browser) have XP appearence. This is very strange.Can anybody help me??? I'm going crazy... :P Never say never

    J 1 Reply Last reply
    0
    • C carlos_rocha

      Hi! I Have a form with several objects with the XP theme (Application.EnableVisualStyles()) and When i add a WebBrowser object all the previous objects are showed with the normal appearence. Does anyone know anything about this? I've read that the webBrowser object isn't "themeble" but it seems to be affecting my app. If i launch a new form from the first form (and the first form doesn't possess a webBrowser object) with several objects and a webBrowser object then, in the new form all the objects(but the browser) have XP appearence. This is very strange.Can anybody help me??? I'm going crazy... :P Never say never

      J Offline
      J Offline
      Joshua Quick
      wrote on last edited by
      #2

      There's a bug in VB.Net where it won't theme your form if certain controls are present such as a toolbar. Calling DoEvents() right after EnableVisualStyles() makes it work. Example: ' Enabling visual styles turns on WinXP theme support. ' XP theme won't be shown unless you call DoEvents() right after. Works-around an MS bug. Application.EnableVisualStyles() Application.DoEvents()

      C 1 Reply Last reply
      0
      • J Joshua Quick

        There's a bug in VB.Net where it won't theme your form if certain controls are present such as a toolbar. Calling DoEvents() right after EnableVisualStyles() makes it work. Example: ' Enabling visual styles turns on WinXP theme support. ' XP theme won't be shown unless you call DoEvents() right after. Works-around an MS bug. Application.EnableVisualStyles() Application.DoEvents()

        C Offline
        C Offline
        carlos_rocha
        wrote on last edited by
        #3

        Thanks a lot.Major bug in vb .NET. where do u get the answers for these things? :D Never say never

        J 1 Reply Last reply
        0
        • C carlos_rocha

          Thanks a lot.Major bug in vb .NET. where do u get the answers for these things? :D Never say never

          J Offline
          J Offline
          Joshua Quick
          wrote on last edited by
          #4

          carlos_rocha wrote: where do u get the answers for these things? Oh, I just searched the Internet. A lot of people ran into this issue. Including myself. I hope it worked out for you! Good luck! :)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups