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. Making a simple button

Making a simple button

Scheduled Pinned Locked Moved C#
question
3 Posts 3 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.
  • S Offline
    S Offline
    sharpiesharpie
    wrote on last edited by
    #1

    Is there a way to create a simple button with no xp skins or anything? (like the buttons in minesweeper)? I tried to disable UseVisualStyleBackColor but it still shows a blue rectangle on the button after it's been clicked.

    J J 2 Replies Last reply
    0
    • S sharpiesharpie

      Is there a way to create a simple button with no xp skins or anything? (like the buttons in minesweeper)? I tried to disable UseVisualStyleBackColor but it still shows a blue rectangle on the button after it's been clicked.

      J Offline
      J Offline
      Jon Hulatt
      wrote on last edited by
      #2

      You might find that one of the various FlatStyle options on Button does the job. Otherwise just draw the button yourself in an overridden OnPaint.

      using System.Beer;

      1 Reply Last reply
      0
      • S sharpiesharpie

        Is there a way to create a simple button with no xp skins or anything? (like the buttons in minesweeper)? I tried to disable UseVisualStyleBackColor but it still shows a blue rectangle on the button after it's been clicked.

        J Offline
        J Offline
        Jimmanuel
        wrote on last edited by
        #3

        If you're using Visual Studio open up Program.cs and remove the line Application.EnableVisualStyles(); inside the Main function. This is what tells the app to use the Windows XP theme; doing this will remove the visual styles from every control in the app.

        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