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. Graphics
  4. Transparent Background of User Control

Transparent Background of User Control

Scheduled Pinned Locked Moved Graphics
graphicshelpwinformscom
4 Posts 2 Posters 5 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.
  • N Offline
    N Offline
    NazarHussain
    wrote on last edited by
    #1

    AoA I am doing a GDI+ project. In which i created a user control with transparent background. That is fine. But when i add this control two times in a from, it works strange. When a Control overlays other, the background of the control came as the background of the main form not the user control. Please help me to solve this problem. The link of the file is given below. Click to Download[^] Waiting for any kind of help. Regards, Nazar Hussain

    T 1 Reply Last reply
    0
    • N NazarHussain

      AoA I am doing a GDI+ project. In which i created a user control with transparent background. That is fine. But when i add this control two times in a from, it works strange. When a Control overlays other, the background of the control came as the background of the main form not the user control. Please help me to solve this problem. The link of the file is given below. Click to Download[^] Waiting for any kind of help. Regards, Nazar Hussain

      T Offline
      T Offline
      Tim Craig
      wrote on last edited by
      #2

      Do you have the WS_CLIPSIBLINGS style set for your control window? It might be clipping its sibling and that's why you see the main window as the background. Something to look at anyhow. BTW, it's very unlikely anyone is going to click on a link to an executable.

      If you don't have the data, you're just another asshole with an opinion.

      N 1 Reply Last reply
      0
      • T Tim Craig

        Do you have the WS_CLIPSIBLINGS style set for your control window? It might be clipping its sibling and that's why you see the main window as the background. Something to look at anyhow. BTW, it's very unlikely anyone is going to click on a link to an executable.

        If you don't have the data, you're just another asshole with an opinion.

        N Offline
        N Offline
        NazarHussain
        wrote on last edited by
        #3

        Thanks sir, You guide me to the exact thing. Please guide me further, when i use WS_CLIPSIBLINGS in CreateParams overloaded function of the UserControl and run the application. It gave an Win32Exception "The parameter is incorrect". Please guide me to how to implement WS_CLIPSIBLINGS And sorry for last time exe file. I will always upload source project next when needed.

        T 1 Reply Last reply
        0
        • N NazarHussain

          Thanks sir, You guide me to the exact thing. Please guide me further, when i use WS_CLIPSIBLINGS in CreateParams overloaded function of the UserControl and run the application. It gave an Win32Exception "The parameter is incorrect". Please guide me to how to implement WS_CLIPSIBLINGS And sorry for last time exe file. I will always upload source project next when needed.

          T Offline
          T Offline
          Tim Craig
          wrote on last edited by
          #4

          NazarHussain wrote:

          Please guide me to how to implement WS_CLIPSIBLINGS

          I OR it with the other window styles when I call the Create method on the window. But I'm using C++ and WTL for a framework lately. You haven't said but I get the impression you might be using C#. If so, I know next to nothing about C#.

          If you don't have the data, you're just another asshole with an opinion.

          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