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. problems in tool bar display

problems in tool bar display

Scheduled Pinned Locked Moved Visual Basic
helpquestioncsharpdotnet
2 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
    contact ajo
    wrote on last edited by
    #1

    recently i posted a question as follows --------------------------------------- i am using toolbar component .net ver 2 (not toolstrip) in vb.net 2005. if i give application.enablevisualstyle command to enable xp style interface then icons on my toolbar will not come. if i disabel xp visual style it will come? how can i show this toolbar in xp style settings? pls help me.... This is the answer which i got ------------------------------ This is a bug in the .NET framework. You can work-around it by calling Application.DoEvents() after EnableVisualStyles. i tried this, but its not working, after this also i can't see toolbar icons, i can see only deviders, can u please explain me to solve this problem... with thanks ajo:(

    J 1 Reply Last reply
    0
    • C contact ajo

      recently i posted a question as follows --------------------------------------- i am using toolbar component .net ver 2 (not toolstrip) in vb.net 2005. if i give application.enablevisualstyle command to enable xp style interface then icons on my toolbar will not come. if i disabel xp visual style it will come? how can i show this toolbar in xp style settings? pls help me.... This is the answer which i got ------------------------------ This is a bug in the .NET framework. You can work-around it by calling Application.DoEvents() after EnableVisualStyles. i tried this, but its not working, after this also i can't see toolbar icons, i can see only deviders, can u please explain me to solve this problem... with thanks ajo:(

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

      You should enable visual styles in a Main function, before your form gets loaded, then call DoEvents(). I recommend that you create a Main class and add the Main method there as shown below.

      Public Class Main
      Public Shared Sub Main(ByVal args() As String)
      Application.EnableVisualStyles()
      Application.DoEvents()
      Application.Run(New MyForm)
      End Sub
      End Class

      Next, you need to change your project setting's Startup Object to "Sub Main". You can find this option by right clicking your project in the solution explorer, click on Properties, select CommonProperties\General in the dialog's tree.

      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