Results 1 to 3 of 3

Thread: Question for a champion !

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2004
    Location
    Belgium
    Posts
    77

    Exclamation Question for a champion !

    I have a question, I added the line application.enablevisualstyles() and put all my button on 'System' as Flatmode property.

    It work fine (they have the XP look), until I add a WebBrowser control on the poage, it cause them to comeback to 98 style.

    What's the prob ? Can someone give a solution to prevent this bug when you add a WebBrowser on a application.

    Note : It disable XP Style boutton over all the application even on form without Webbrowser.

    Thanks for help

  2. #2
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142
    where are you putting the EnableVisualStyles call?
    to combat problems with visualstyles / some controls , you need to put the call before InitializeComponent and add an " Application.DoEvents() "
    eg:
    VB Code:
    1. #Region " Windows Form Designer generated code "
    2.  
    3.     Public Sub New()
    4.         MyBase.New()
    5.  
    6.         'This call is required by the Windows Form Designer.
    7.         '///
    8.         '/// put the call here to enable styles .....
    9.         Application.EnableVisualStyles()
    10.         Application.DoEvents()
    11.        
    12.         InitializeComponent()
    13.  
    14.         'Add any initialization after the InitializeComponent() call
    15.  
    16.     End Sub
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2004
    Location
    Belgium
    Posts
    77
    I put the DoEvent() it's exactly like in your exemple but it doesn't work. Button aren't back in XP Style.


    Thanks anyway, anymore idea ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width