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. C#
  4. .net 2.0 visual style

.net 2.0 visual style

Scheduled Pinned Locked Moved C#
csharpwinformstutorialquestiondiscussion
5 Posts 4 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.
  • F Offline
    F Offline
    fmardani
    wrote on last edited by
    #1

    Hi, I am using winforms .net 2.0 It seems that the visualStyle does not have any effect on the controls looks. for example a button looks as if you are using .net 1.0 Any thoughts please?

    L T 2 Replies Last reply
    0
    • F fmardani

      Hi, I am using winforms .net 2.0 It seems that the visualStyle does not have any effect on the controls looks. for example a button looks as if you are using .net 1.0 Any thoughts please?

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      There are several ways to get there: * * 1. * call Application.EnableVisualStyles(); just before * Application.Run(f); * disadvantages: * - this method does not exist under .NET 1.0 * - this method has a bug, causing later some ShowDialogs to throw a * SEHException * e.g. when using a ContextMenu on a NotifyIcon * * 2. * create a manifest file with a specific name (.exe.manifest) and put it * in the directory containing the exe file itself. The fixed content must be: * .NET control deployment tool * * 3. * create an instance of a special class before creating any of the intended * forms, as in: * using (new LP_EnableTheming(true)) { myForm form=new myForm(); form.CreateControl(); // can be included in myForm constructor ! Application.Run(form); } */ The special class is inspired on the article at http://www.codeproject.com/useritems/ThemingInScope.asp :) Luc Pattyn -- modified at 14:12 Wednesday 27th December, 2006

      D 1 Reply Last reply
      0
      • L Luc Pattyn

        There are several ways to get there: * * 1. * call Application.EnableVisualStyles(); just before * Application.Run(f); * disadvantages: * - this method does not exist under .NET 1.0 * - this method has a bug, causing later some ShowDialogs to throw a * SEHException * e.g. when using a ContextMenu on a NotifyIcon * * 2. * create a manifest file with a specific name (.exe.manifest) and put it * in the directory containing the exe file itself. The fixed content must be: * .NET control deployment tool * * 3. * create an instance of a special class before creating any of the intended * forms, as in: * using (new LP_EnableTheming(true)) { myForm form=new myForm(); form.CreateControl(); // can be included in myForm constructor ! Application.Run(form); } */ The special class is inspired on the article at http://www.codeproject.com/useritems/ThemingInScope.asp :) Luc Pattyn -- modified at 14:12 Wednesday 27th December, 2006

        D Offline
        D Offline
        Dan Neely
        wrote on last edited by
        #3

        Luc Pattyn wrote:

        The above got dammaged (all less/greater than signs got interpreted; I need an extra HTML command ?!)

        You need to check "Ignore HTML tags in this message" to keep the board from eating them.

        -- Rules of thumb should not be taken for the whole hand.

        L 1 Reply Last reply
        0
        • D Dan Neely

          Luc Pattyn wrote:

          The above got dammaged (all less/greater than signs got interpreted; I need an extra HTML command ?!)

          You need to check "Ignore HTML tags in this message" to keep the board from eating them.

          -- Rules of thumb should not be taken for the whole hand.

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          Thanks Dan.

          Luc Pattyn

          1 Reply Last reply
          0
          • F fmardani

            Hi, I am using winforms .net 2.0 It seems that the visualStyle does not have any effect on the controls looks. for example a button looks as if you are using .net 1.0 Any thoughts please?

            T Offline
            T Offline
            Thomas Stockwell
            wrote on last edited by
            #5

            The visual style for all of the .NET frameworks is what the machine is currently using. With XP for example, their are 3 visual styles: luna, metallic, and homestead. All of the .NET frameworks (as long as the code or manifest files are provided in the application) will use the visual style specified. The main differences in the UI between .NET 1.1 and .NET 2.0 would have to be the new ToolStrip, MenuStrip, and ContextStrip which are still dependent on the visual style (if render property is system defined). The strips which have replaced the menus and toolbars of .NET 1.x have a newer appearance that can only be used on systems with the .NET 2.0 framework installed. This new appearance will help in giving your application an interface similar to that of Office 2000-2003.

            Regards, Thomas Stockwell Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Visit my homepage Oracle Studios[^]

            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