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. Re:How to make a transperent window in .net2.0

Re:How to make a transperent window in .net2.0

Scheduled Pinned Locked Moved C#
csharphelptutorial
7 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.
  • R Offline
    R Offline
    RameshwerE
    wrote on last edited by
    #1

    Can any body help me out how to make a window as transperant window in .net2.0;

    K M 2 Replies Last reply
    0
    • R RameshwerE

      Can any body help me out how to make a window as transperant window in .net2.0;

      K Offline
      K Offline
      KrunalC
      wrote on last edited by
      #2

      try setting the opacity property for the window... HTH.

      R 1 Reply Last reply
      0
      • K KrunalC

        try setting the opacity property for the window... HTH.

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

        Actually my requirement is to display only the text which is present on the form without showing the form to the user.If i tries with opacity it is showing nothing.Everything becomes transperant.

        K 1 Reply Last reply
        0
        • R RameshwerE

          Actually my requirement is to display only the text which is present on the form without showing the form to the user.If i tries with opacity it is showing nothing.Everything becomes transperant.

          K Offline
          K Offline
          KrunalC
          wrote on last edited by
          #4

          don't put the text on the form as lable or something. instead paint the text using DrawText in OnPaint. I'm not sure it will work or not. but you can try. HTH.

          1 Reply Last reply
          0
          • R RameshwerE

            Can any body help me out how to make a window as transperant window in .net2.0;

            M Offline
            M Offline
            Martin 0
            wrote on last edited by
            #5

            Hello, Set the "TransparencyKey" property equal to your forms BackColor.

            All the best, Martin

            R 1 Reply Last reply
            0
            • M Martin 0

              Hello, Set the "TransparencyKey" property equal to your forms BackColor.

              All the best, Martin

              R Offline
              R Offline
              RameshwerE
              wrote on last edited by
              #6

              Hi Martin, your idea is good bt here my forms backcolot is changing dynamically.How i can implement this one with tansperancykeycolor property.

              M 1 Reply Last reply
              0
              • R RameshwerE

                Hi Martin, your idea is good bt here my forms backcolot is changing dynamically.How i can implement this one with tansperancykeycolor property.

                M Offline
                M Offline
                Martin 0
                wrote on last edited by
                #7

                Hello,

                RameshwerE wrote:

                your idea is good

                :rose:

                RameshwerE wrote:

                my forms backcolot is changing dynamically

                You have to handle the BackColorChanged event and set it there accordingly. //Constructor code this.BackColorChanged += new System.EventHandler(this.yourForm_BackColorChanged); private void yourForm_BackColorChanged(object sender, System.EventArgs e) { this.TransparencyKey = this.BackColor; } Hope it helps!

                All the best, Martin

                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