GetBKColor() API
SetBKColor() API
其实,如果是自己写的程序,直接设置文本框的背景色和边框的风格就可以了。

解决方案 »

  1.   

    The GetBkColor function returns the current background color for the specified device context. COLORREF GetBkColor(    HDC hdc  // handle of device context
       );
     ParametershdcIdentifies the device context whose background color is to be returned.  Return ValuesIf the function succeeds, the return value is a COLORREF value for the current background color.
    If the function fails, the return value is CLR_INVALID. 上面是你要的函数,设置边框BorderStyle := bsNone;如果你仅仅是想看上去只有文字的话,只需要将edit的背景色设为与Form一样就行了 Color := Form1.Color;good luck
      

  2.   

    设计阶段:
    Edit1 BorderStyle  bsNone
    Edit1 Color        clBtnFace(Form的颜色)当然可以在运行时配置
      

  3.   

    补充:edit类有parentcolor属性,允许edit使用父类的颜色,设edit1.parentcolor:=true可以保证编辑框透明。
      

  4.   

      Memo1.Color := Memo1.Parent.Color;