将图片转存为其它颜色格式(GDI+)
摘要:uses GdiPlus;procedure TForm1.Button1Click(Sender: TObject);var img: IGPImage; bit: IGPBitmap; g: IGPGraphics;begin img := TGPImage.Create('c:\temp\01.png'); bit := TGPBitmap.Create(img.Width, img.Height, PixelFormat1bppIndexed); g := TGPGraphics.Create(bit); g.DrawImage(img, 0, 0, img.Width
阅读全文
posted @
2011-07-20 21:09
万一
阅读(4079)
推荐(2) 编辑
关于三语 (简体、繁体、英语) 切换的尝试
摘要:在空白窗体上添加 PopupMenu1, 并添加几个测试用的菜单项, 分别命名为: m1、m2、m3、mCn、mBig、mEn; 激活 mCn 的 OnClick 事件和窗体的 OnCreate 事件.unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Menus;type TForm1 = class(TForm) PopupMenu1: TPopupMenu; m1: TMenuItem; m2: TMen
阅读全文
posted @
2011-07-14 00:30
万一
阅读(3970)
推荐(0) 编辑
做了一个浏览指定文件格式的 TreeView
摘要:unit DirTreeView;interfaceuses SysUtils, Classes, Controls, Forms, ComCtrls;type TDirTreeView = class(TTreeView) private FRootPath: string; FExt: string; FFileName: string; protected procedure Collapse(Node: TTreeNode); override; procedure Expand(Node: TTreeNode); override; procedure Change(Node: TT
阅读全文
posted @
2011-07-07 14:39
万一
阅读(4416)
推荐(2) 编辑