Tests with TextBox under DWM glass

后端 未结 1 1543
野性不改
野性不改 2021-02-08 11:18

I\'m trying to deal with TextBox text\'s color under DWM Glass. I read a lot of material, still no perfect solution.

The almost perfect results code i found here: http:/

1条回答
  •  醉酒成梦
    2021-02-08 12:08

    If you set the TransparencyKey of the form to the background color in the glass area then, you can use any control over it, but you cannot use the color specified in the TransparencyKey in any one of the controls placed there.

    This method has an inconvenient of allowing you to click through the glass on the window in the background. But there may be a way around this too.

    EDIT: I have been searching for this for a long time now... it must be impossible then. The carret is managed by windows API itself, you cannot force it to appear in the way you want. What you could do is to draw the whole text-box yourself... but that whould be too much work for so little.

    I summary: GDI+ and DWM do not combine very well. I give up.

    0 讨论(0)
提交回复
热议问题