2011年8月10日

摘要: delphi在RichEdit控件中插入GIF动画表情在UDP即时通讯软件中实现类似于QQ的动画表情,在richEdit控件中插入gif动画表情。发送的时候将表情转为命令,接收之后,再将命令转换为相应的动画表情。需要引用一个QQ的DLL,文件在附件中。将此DLL导入到DELPHI中。unit URichEdit;interfaceusesWindows, Messages, SysUtils, Classes, Controls, StdCtrls, ActiveX, ComCtrls,RxRichEd, OleServer, ImageOleLib_TLB, coconst, UConst, 阅读全文

posted @ 2011-08-10 23:53 严武 阅读(1560) 评论(0) 推荐(0) 编辑

摘要: beginbmp:=TBitmap.Create;jpeg:=TJPEGImage.Create;jpeg.LoadFromFile(fname);withbmpdobeginPixelFormat:=pf24bit;Height:=60;Width:=self.RzListBox.Width;Canvas.Brush.Color:=$00F0EDE6;Canvas.FillRect(Canvas.ClipRect);Canvas.StretchDraw(Bounds(0,0,80,60),jpeg);end;//这里你可以用save之类的方法了bmp.Free;jpeg.Free;----- 阅读全文

posted @ 2011-08-10 16:44 严武 阅读(2514) 评论(0) 推荐(0) 编辑

摘要: (1)方法1varIcon : TIcon;Bitmap : TBitmap;begin Icon := TIcon.Create; Bitmap := TBitmap.Create; Icon.LoadFromFile('c:\picture.ico');//Load an ICOfrom File Bitmap.Width := Icon.Width; Bitmap.Height := Icon.Height; Bitmap.Canvas.Draw(0, 0, Icon ); Bitmap.SaveToFile('c:\picture.bmp'); //Co 阅读全文

posted @ 2011-08-10 16:20 严武 阅读(1013) 评论(0) 推荐(0) 编辑

摘要: uses RichEdit;{将RichEdit1的内容保存为图片,此函数也适合于RxRichEdit,即RichEdit: TRxRichEdit}procedure RichEditToCanvas(RichEdit: TRichEdit; Canvas: TCanvas; PixelsPerInch: Integer);varImageCanvas: TCanvas;fmt: TFormatRange;beginImageCanvas := Canvas;with fmt dobeginhdc:= ImageCanvas.Handle;hdcTarget:= hdc;rc:= Rect( 阅读全文

posted @ 2011-08-10 10:05 严武 阅读(1473) 评论(0) 推荐(0) 编辑


Copyright © 2024 严武
Powered by .NET 9.0 on Kubernetes