C# Winform Application : Label transparency.

Proposed C# Winform Application : Label transparency.

  • Tuesday, August 21, 2012 11:16 AM
     
     

    Hi thr,
    How can i set a label background transparent with respect to other siblings or child controls. default label behavior is as shown in image.

    currently i m developing a win-form application in which labels controls are drag-gable and drop-able and i want those label controls should transparent with repsect to each other. After googling a lot i found this one Label with invisible background. but it won't worked as i wanted. It's just that I can see the desktop through that area of the form now, which isn't quite the effect we need.

    can any one help regarding this ?

    Thanking you in anticipation.

    • Edited by aressDev Tuesday, August 21, 2012 11:17 AM
    •  

All Replies

  • Tuesday, August 21, 2012 11:37 AM
     
     
  • Tuesday, August 21, 2012 12:10 PM
     
     

    Hi Joon,
    Thanks for your reply,

    But in your both the scenarios Label is transparent with respect to there Parent Control. and i m expecting the Label transparency with respect to other Label control or Picture box. without using a Parent child relation.

    can you plz help more on this ?

    thanks

     
  • Tuesday, August 21, 2012 6:26 PM
     
      Has Code

    HI

    labelouter.Parent = label1inner;

    labelouter.BackColor = Color.Transparent;

    please mark as answer if found helpful

    Thanks
  • Wednesday, August 22, 2012 4:26 AM
     
     

    Hi Rajeev,
    Thanks for your reply.

    i tried your suggestion but it is not helpful. as we can assign Container object as a parent controls and label and picture boxes are not containers.

    thanks

     
  • Wednesday, August 22, 2012 6:06 AM
     
     Proposed

    Hi

    Please try this link

    http://www.doogal.co.uk/transparent.php

    please mark as answer if found helpful

    regards

    Rajeev


  • Saturday, August 25, 2012 5:01 AM
     
     
    Hi Rajeev,
    Thanks for your reply.

    i tried your solution, but this time it is not help full for me. as it draws text over the other controls. and in my scenarios i can't draw the text over other controls.

    because i have some properties where it will conflict with them such as alignments, dynamic font calculations, auto sizing, word wrap ...etc.

    please help me regarding this issue.

    Thanking you in anticipation.