unit Unit1;

interface

uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;

type

TForm1 = class(TForm)

edt1: TEdit;

procedure FormCreate(Sender: TObject);

private

fbmp: TBitmap;

fbsh: HBRUSH;

protected procedure WndProc(var Messages: TMessage); override;

public { Public declarations }

end;

var Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);

begin

fbmp := TBitmap.Create;

fbmp.LoadFromFile('c:\back1.bmp');

fbsh := CreatePatternBrush(fbmp.Handle);

end;

procedure TForm1.WndProc(var Messages: TMessage);

begin

inherited;

case Messages.Msg of

WM_CTLCOLOREDIT, WM_CTLCOLORSTATIC:

if (Messages.LParam=edt1.Handle) and(fbsh <> 0) then

begin

SetBkMode(Messages.WParam, TRANSPARENT);

Messages.Result := fbsh

end;

end;

end;

end.

delphi TEdit透明的更多相关文章

  1. delphi TEdit设为下横线,类似填表格

    delphi TEdit设为下横线,类似填表格效果,无需第三方控件就可以实现. 无须编写代码,只要设置一下控件属性 需要修改这些属性: BorderStyle改为bsNone BevelKind改为b ...

  2. delphi 窗体透明

        TransparentColor:=true;    TransparentColorValue:=clFuchsia;    Color:= TransparentColorValue;  ...

  3. (转载)c++builder/delphi中透明panel及透明窗口的实现方法_delphi教程

    c++builder/delphi中透明panel及透明窗口的实现方法_delphi教程 可能大多数程序员会问:透明窗口,特别是透明Panel有什么应用价值呢?可别小看它们哦,下面我就来讲讲他们的巨大 ...

  4. delphi 窗体透明详解TransparentColorValue,窗体透明控件不透明

    关于窗体透明的做法 来自:http://blog.csdn.net/shuaihj/article/details/8610343 关于窗体透明的做法 1.在Delphi中,设置窗体的AlphaBle ...

  5. delphi窗体透明但上面的控件不透明怎么实现

    我不知道LAZARUS是什么玩意.纯用DELPHI的话.procedure TForm1.FormCreate(Sender: TObject);var mStyle, mExStyle: Longi ...

  6. Delphi MlSkin V1.1 发布啦! 它能让你的程序拥有像QQ一样多彩炫丽的外观!

    http://bbs.csdn.net/topics/390740239 本帖最后由 u014161811 于 2014-03-24 09:46:40 编辑 QQ皮肤透明TEdit透明TMemo图片按 ...

  7. TEdit,TMemo背景透明

    The component below works perfectly, except for the following problem: 1) Saves the component below ...

  8. TEdit,TMemo背景透明(SetWindowLong(WS_EX_TRANSPARENT)增加透明风格)

    The component below works perfectly, except for the following problem: 1) Saves the component below ...

  9. Delphi控件之---UpDown以及其与TEdit的配合使用(比如限制TEdit只能输入数字,还有Object Inspector之组件属性的介绍)

    最近在开发中使用到了UpDown这个控件,但是因为之前没有使用过,所以很不熟悉,于是就编写了一个简单的demo来学习UpDown以及其结合TEdit的用法. 初步的常用功能的简介 目前(2015.08 ...

随机推荐

  1. mysql 微信用户昵称emoji 完整保存

    微信用户昵称现在丰富多样,一些个性的名称中经常包含有特殊字符,以及emoji表情.起先,我总以为MySQL只能保存纯文本数据.但其实mysql(5.7版本)已非常强大,完整保存微信用户昵称(emoji ...

  2. Mysql 性能优化2 系统参数配置方法 和 文件系统

    --------------------------------------------目录------------------------------------------------- • 关于 ...

  3. 【ActiveMQ入门-4】ActiveMQ学习-异步接收

    总体说明: 1. 一个生产者/发布者:可以向多个目的地发送消息: 2. 每个目的地(destination)可以有多个订阅者或消费者: 如下图所示: 程序结构: 1. Publisher.java   ...

  4. httpclient httpcore jar包及源码

    HttpClient HttpCore HttpComponents jar src download httpclient home help

  5. 【转载】Keepalived安装使用详解

    转自:http://www.cnblogs.com/MacoLee/p/5853356.html 简介 Keepalived是一个基于VRRP协议来实现的服务高可用方案,可以利用其来避免IP单点故障, ...

  6. CORS跨域的概念与TP5的解决方案

    namespace app\api\behavior; use think\Response; class CORS{ public function appInit(&$params) { ...

  7. Log4net详细说明(全)

    转自:http://www.cnblogs.com/zhangchenliang/p/4546352.htmlhttp://www.cnblogs.com/zhangchenliang/p/45463 ...

  8. java管道通信

    介绍:不同的数据源之间通过建立管道进行数据通信.如图: 线程之间通信最好的方式就是采用管道机制,类似水管一样,水管可以对接,组合成各种具有过滤性质的管道,管道和线程灵活使用,可以提高效率.(Chann ...

  9. Noip往年题目整理

    Noip往年题目整理 张炳琪 一.历年题目 按时间倒序排序 年份 T1知识点 T2知识点 T3知识点 得分 总体 2016day1 模拟 Lca,树上差分 期望dp 144 挺难的一套题目,偏思维难度 ...

  10. python学习之----urllib与urllib2的区分

    urllib 还是urllib2 ? 如果你用过Python 2.x 里的urllib2 库,可能会发现urllib2 与urllib 有些不同. 在Python 3.x 里,urllib2 改名为u ...