随笔分类 -  综合随笔

上一页 1 2
delphi2009 vcl - Tlinklabel(链接标签)
摘要:编辑该控件OnLinkLink事件,代码如下: 阅读全文
posted @ 2011-02-08 14:45 巅枫 阅读(537) 评论(0) 推荐(0)
TGBBitmap 与 TBitmap 互转
摘要:TGBBitmap用在GDI+中,而TBitmap用在GDI中,有的时候,我们需要将它们进行转换,例如我们要将一个JPEG的图片放到TBitmap中,这样它就可以很方便的被Delphi中的多个控件所使用(如ImageList、Image等等控件)。我们通过TGBBitmap的GetHBITMAP方法可以实现这种转换,如下:代码中的GetHBITMAP方法第一个参数为背景颜色,对于非透明图像,这个参数设置为什么颜色都没有所谓.但对于透明图像(如png),我们就能看到这个背景色了(如图2,图片中间透明的,于是我们就看到了白色的背景色),第二个参数是位图句柄变量.TBitmap 转 TGBBitma 阅读全文
posted @ 2011-01-29 20:07 巅枫 阅读(1264) 评论(0) 推荐(0)
FontFamily 和Font 的区别
摘要:GDI+ 将字样相同但字形不同的字体分组为字体系列。例如,下面是同一个字样(Arial),不同的字形 :--------------------------------------------------------Arial Regular 常规Arial Bold 粗体Arial Italic 斜体Arial Bold Italic 粗斜体-------------------------------------------------GDI+ 使用四种字形形成字体系列:常规、粗体、倾斜和粗斜体。像 narrow 和 rounded 之类的形容词不被视为字形;而是作为字体系列名的一部分。如 阅读全文
posted @ 2011-01-28 22:50 巅枫 阅读(4841) 评论(0) 推荐(0)
抽象类
摘要:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TOb... 阅读全文
posted @ 2011-01-24 21:04 巅枫 阅读(259) 评论(0) 推荐(0)
覆盖虚方法
摘要:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TOb... 阅读全文
posted @ 2011-01-24 20:37 巅枫 阅读(226) 评论(0) 推荐(0)
类方法调用
摘要:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TOb... 阅读全文
posted @ 2011-01-24 18:51 巅枫 阅读(306) 评论(0) 推荐(0)
类成员的可见性
摘要:决定要好好的学习一下“类”了,参与万一老师的博客,开干了!![代码] 阅读全文
posted @ 2011-01-24 18:49 巅枫 阅读(198) 评论(0) 推荐(0)

上一页 1 2