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. Change the title bar etc?

Change the title bar etc?

Scheduled Pinned Locked Moved C#
helpquestion
5 Posts 4 Posters 1 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.
  • A Offline
    A Offline
    anotherside2000
    wrote on last edited by
    #1

    Hi there :) I was wondering if it is possible to customize the title bar, buttons etc. in a Form. I want to change the color and maybe draw my own "maximize" button etc. The user should still be able to do all the "normal" things with the form, like changing the position. Really appreciate if someone could help me! Sincerely Pat

    S A S A 4 Replies Last reply
    0
    • A anotherside2000

      Hi there :) I was wondering if it is possible to customize the title bar, buttons etc. in a Form. I want to change the color and maybe draw my own "maximize" button etc. The user should still be able to do all the "normal" things with the form, like changing the position. Really appreciate if someone could help me! Sincerely Pat

      S Offline
      S Offline
      SHaroz
      wrote on last edited by
      #2

      The only way I know of to do this is to set the FormBorderStyle to None. Then, add controls and modify their behavior and appearance however you want. This probably isn't the answer you were looking for, but I hope it helps. -Steve

      1 Reply Last reply
      0
      • A anotherside2000

        Hi there :) I was wondering if it is possible to customize the title bar, buttons etc. in a Form. I want to change the color and maybe draw my own "maximize" button etc. The user should still be able to do all the "normal" things with the form, like changing the position. Really appreciate if someone could help me! Sincerely Pat

        A Offline
        A Offline
        Alex Korchemniy
        wrote on last edited by
        #3

        The caption bar and the maximize, minimize, close buttons are drawn by the windows operating system. I did some research, and there is very little you can do about it. The only way you can do it is to make a form with no border, make your program skinable (which is a pain), and add draging and resizing support. At least this is the way I had to do it. If there is a better way tell me too.

        1 Reply Last reply
        0
        • A anotherside2000

          Hi there :) I was wondering if it is possible to customize the title bar, buttons etc. in a Form. I want to change the color and maybe draw my own "maximize" button etc. The user should still be able to do all the "normal" things with the form, like changing the position. Really appreciate if someone could help me! Sincerely Pat

          S Offline
          S Offline
          Stephane Rodriguez
          wrote on last edited by
          #4

          anotherside2000 wrote: I was wondering if it is possible to customize the title bar, buttons etc. What about checking out the CodeProject articles about Balloon Windows with C# ? When you know a Form is mostly an oriented-object event-based class running on top of a standard WIN32 Window, you can figure out that this is possible. The form is created with hardcoded window styles (managed by an hardcoded default .NET System.Windows.Forms.CreateParams instance). But, once that form is created (this.Handle!=0), you could just start hacking the underlying window just like with C/C++ code. For that purpose, use P/Invoke unsafe native methods like SetWindowStyle, ... You'll need the hwnd of that window : that's this.Handle (cast the returned IntPtr to an int if you like). Be also sure to Hide the SizeGrip (drawn around the window) with a simple this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; Good luck!

          1 Reply Last reply
          0
          • A anotherside2000

            Hi there :) I was wondering if it is possible to customize the title bar, buttons etc. in a Form. I want to change the color and maybe draw my own "maximize" button etc. The user should still be able to do all the "normal" things with the form, like changing the position. Really appreciate if someone could help me! Sincerely Pat

            A Offline
            A Offline
            anotherside2000
            wrote on last edited by
            #5

            Thank you all for the help! Appreciate it :) Sincerely Pat

            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