摘要载入中…    请稍等…












内容载入中…    请稍等…

如长时间看不到内容,请关闭浏览器,重新打开此页!

芯友首页 应用软件 编程开发 网络硬件 资源下载 动漫音乐 精美图库 芯友论坛 视频教程 电脑技术QQ群:72845454
 ★★photoshop学友-史上最强播放器★★
 位置:编程开发>Deiphi>Deiphi实例教程
◎→ 本类最新
在DELPHI中用线程排序
在Delphi中使用Queued Component
作非常规程序菜单掌握delphi
执行一个外部程序并等待它的完成
在应用程序中跟踪MOUSE的坐标
五子棋源代码
显示密码的原理
◎→相关资源
C语言入门视频教程
C#编程WinForm入门视频
Asp.net入门视频教程下载
VC++编程视频教程下载
VB窗体文章
HTML入门教程
Deiphi实例教程
Deiphi窗体文章
Deiphi数据库编程
Deiphi网络编程
Deiphi图形图象文章
Deiphi系统文件
◎→ 热门资源
Listview中实现点击栏目标题排序
Microsoft Agent技术在Delphi中的
MIDAS中动态强制约束编程
Chuck Jazdzewski的离开意味着De
COM程序编写入门(三)
DELPHI中利用对象的常用属性制作
Delphi中巧妙利用RES文件

OICQ中用户图标选择的实现


日期:2008-10-20 22:03:09    来源:
   
 ·Delphi开发Web Server程序响应用户的输入 ·Delphi制作带图标的弹出式选单
 ·Photoshop CS3新的抠图魔棒选择工具介绍
OICQ中用户图标选择的实现


unit unit1;

interface

uses
 windows, messages, sysutils, classes, graphics, controls, forms, dialogs,
 stdctrls;

type
 tform1 = class(tform)
  list1: tcombobox;
  button1: tbutton;
  procedure button1click(sender: tobject);
  procedure formcreate(sender: tobject);
  procedure list1drawitem(control: twincontrol; index: integer;
   rect: trect; state: townerdrawstate);
 private
  { private declarations }
 public
  { public declarations }
 end;

var
 form1: tform1;

implementation

{$r *.dfm}

procedure tform1.button1click(sender: tobject);
         var
s: string;
begin
randomize;
s:= inttostr(random(100));//last here!
createdir(s);
end;
procedure tform1.formcreate(sender: tobject);
var
bit1,bit2,bit3,bit4,bit5,bit6: tbitmap;
begin
 list1.style := csownerdrawvariable;
 list1.itemheight := 30;
 bit1 := tbitmap.create;
 bit1.loadfromfile('c:\program files\oicq\face\1-1.bmp');
 bit2 := tbitmap.create;
 bit2.loadfromfile('c:\program files\oicq\face\2-1.bmp');
 bit3 := tbitmap.create;
 bit3.loadfromfile('c:\program files\oicq\face\3-1.bmp');
 bit4 := tbitmap.create;
 bit4.loadfromfile('c:\program files\oicq\face\4-1.bmp');
 bit5 := tbitmap.create;
 bit5.loadfromfile('c:\program files\oicq\face\5-1.bmp');
 bit6 := tbitmap.create;
 bit6.loadfromfile('c:\program files\oicq\face\6-1.bmp');
 list1.items.addobject('图标1',bit1);
 list1.items.addobject('图标2',bit2);
 list1.items.addobject('图标3', bit3);
 list1.items.addobject('图标4', bit4);
 list1.items.addobject('图标5', bit5);
 list1.items.addobject('图标6', bit6);
 list1.itemindex :=0;
end;

procedure tform1.list1drawitem(control: twincontrol; index: integer;
 rect: trect; state: townerdrawstate);
var
bitmap: tbitmap;
offset: integer;
begin
 with(control as tcombobox).canvas do
 begin
  fillrect(rect);
  bitmap := tbitmap(list1.items.objects[index]);
  //bitmap := tbitmap.create;
  //imagelist1.getbitmap(index,bitmap);
  if bitmap<> nil then
  begin
   brushcopy(bounds(rect.left+2,rect.top+2,bitmap.width,bitmap.height),bitmap,
       bounds(0,0,bitmap.width,bitmap.height),clred);
  offset := bitmap.width + 8;
  textout(rect.left+offset,rect.top,list1.items[index]);
  end;

 end;
end;
end.

 [1]

IIS站点新建用户防止旁注

设置ListView的页眉图标

二手显示器的选择

--->QQ空间人气精灵 V3.61┊自动模拟无数真实用户访问QQ空间┊简体中文绿色免费版
--->迅雷国际版 Gigaget V5.5.1.241┊附带左右键选择下载功能┊绿色下载站免安装特别版
--->QQ多用户一键登录 V1.0
--->QQ个性图标 V2.0.040420
--->Omega Edit V1.0┊可协助用户更好的编写网页以及CSS样式内容┊英文绿色特别版
Tags:  用户 图标 选择

芯友网版权所有 1999-2006 | 著作权与商标声明 | 法律声明 | 服务条款 | 隐私声明 | 联系我们