- 博客(15)
- 收藏
- 关注
原创 Image1鼠标进入、离开时
unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Buttons, ExtCtrls, StdCtrls, ImgList;type TForm1 = class(TForm)
2010-04-07 14:52:00
1249
2
转载 半透明窗体
interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs; const//定义常量 WS_EX_LAYERED = $80000; AC_SRC_OVER = $0; AC_SRC_ALPHA =
2010-04-03 12:27:00
495
转载 利用RegisterWindowMessage在不同程序窗体间传递消息
unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Button1: TButton; Button
2010-02-19 09:55:00
3071
转载 窗体在最上层
begin// with Form1 doSetWindowPos(Handle,HWND_TOPMOST, //hWndInsertAfter参数设置为HWND_TOPMOSTLeft,Top,Width,Height, //窗体的位置和尺寸不变SWP_NOACTIVATE or SWP_NOMOVE or SWP_NOSI
2010-02-18 13:38:00
831
转载 MDI子窗体
//关闭子窗体procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);begin action := cafree ;end;//动态创建子窗体 procedure TForm1.N111Click(Sender: TObject);begin form2 := Tform2.Cre
2010-02-18 13:36:00
515
转载 修改文件夹时间
unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, StdCtrls;type TForm1 = class(TForm) DateTimePicker1: TDateTimePicke
2010-02-18 13:34:00
1393
转载 限制录入汉字和小写字符
Procedure KeyFilter(var key:Char);begin if (not (Key in[a..z])) and (not (Key in[A..Z])) and (not (Key in[0..9])) and (not (Key in[-])) and (not (Ord(Key)in [8,13,27,3,22,24]
2010-02-18 13:32:00
589
转载 判断数字和日期需要的字符
function isnum(str:string):boolean;var i:integer;begin for i:=1 to length(str) do if not (str[i] in [0..9,.,-,:]) then begin result:=false; exit; end; result:=true;end;
2010-02-18 13:30:00
366
转载 遍历文件夹及子文件夹
{-------------------------------------------------------------------------------过程名: MakeFileList 遍历文件夹及子文件夹参数: Path,FileExt:string 1.需要遍历的目录 2.要遍历的文件扩展名返回值: TStringList Eg:ListBox1.Items:= Ma
2010-02-18 13:28:00
560
转载 16 进制转换为 10进制
Delphi 中 16 进制数以 $ 为前缀,所以将 16 进制形式的字符串转换为整数即可:function HexToDec(const AHexString: String): Integer;begin// 16 进制转换为 10 进制;Result := StrToInt(’$’ + AHexString);end;
2010-02-18 13:26:00
825
转载 将录入的字符全部换为大写
Procedure KeyToUpper(Var Key:Char);begin IF Key in[a..z] THEN Key := Chr(Ord(Key) - 32) Else Key := Key;end;
2010-02-18 13:24:00
477
转载 最小化到托盘
unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs,ShellAPI;const WM_TRAYNOTIFY = WM_USER+100;type TForm1 = class(TForm)
2010-02-18 13:21:00
668
原创 获取显示器分辨率
function GetDisplay:string;begin result := inttostr(screen.width)+*+inttostr(screen.height);end;
2010-02-16 14:39:00
518
转载 TStringList 常用方法与属性
//TStringList 常用方法与属性:var List: TStringList; i: Integer;begin List := TStringList.Create; List.Add(Strings1); {添加} List.Add(Strings2
2010-02-16 14:21:00
500
转载 获取操作系统版本
Function GetWindowsVersion: String;var AWin32Version: Extended; os:string;begin os:=Windows ; AWin32Version := StrtoFloat(format(%d.%d ,[Win32MajorVersion, Win32MinorVersion]));
2010-02-16 14:12:00
513
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人