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. Close Button But No Icon

Close Button But No Icon

Scheduled Pinned Locked Moved Visual Basic
tutorialquestion
5 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
    Sumit Domyan
    wrote on last edited by
    #1

    Hi, I am trying to create a form with the following attributes: 1. A sizable border 2. Close button 3. No icon in the upper left hand corner All of this can be accomplished using the Sizable FormBorderStyle, but the icon remains. Does anyone know how to do this? Sumit Domyan

    D R 2 Replies Last reply
    0
    • S Sumit Domyan

      Hi, I am trying to create a form with the following attributes: 1. A sizable border 2. Close button 3. No icon in the upper left hand corner All of this can be accomplished using the Sizable FormBorderStyle, but the icon remains. Does anyone know how to do this? Sumit Domyan

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      IIRC, since the form is sizable, you can't get rid of the icon using properties. I think your going to have to owner draw the title bar of the form. I DON'T have any example code, nor do I know of any. But, in theory, it's possible to do. Look into overriding WndProc and handling the WM_NCPAINT message. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      S 1 Reply Last reply
      0
      • S Sumit Domyan

        Hi, I am trying to create a form with the following attributes: 1. A sizable border 2. Close button 3. No icon in the upper left hand corner All of this can be accomplished using the Sizable FormBorderStyle, but the icon remains. Does anyone know how to do this? Sumit Domyan

        R Offline
        R Offline
        rwestgraham
        wrote on last edited by
        #3

        If you just don't want to see an icon, the simplest way is to just create a transparent 16x16 icon file and select that for the form's icon. Of course the title will still be offset the same, and the drop down menu will appear if the user clicks in the space. If you want to get rid of all those, you'll have to custom draw the title area. But if you just want a no icon appearance, a transparent icon is far easier. Robert

        1 Reply Last reply
        0
        • D Dave Kreskowiak

          IIRC, since the form is sizable, you can't get rid of the icon using properties. I think your going to have to owner draw the title bar of the form. I DON'T have any example code, nor do I know of any. But, in theory, it's possible to do. Look into overriding WndProc and handling the WM_NCPAINT message. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          S Offline
          S Offline
          Sumit Domyan
          wrote on last edited by
          #4

          What if form is not resizable? Sumit Domyan

          D 1 Reply Last reply
          0
          • S Sumit Domyan

            What if form is not resizable? Sumit Domyan

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            The only ones that support no icon in the upper left corner are the ToolWindows and None borders. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

            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