![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
其他
文章平均质量分 60
xiaoxinpaigu
本人主要工作负责MES制造执行系统的项目实施和生产软件开发。
展开
-
获取显示器分辨率
function GetDisplay:string;begin result := inttostr(screen.width)+*+inttostr(screen.height);end;原创 2010-02-16 14:39:00 · 477 阅读 · 0 评论 -
半透明窗体
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 · 465 阅读 · 0 评论 -
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 · 487 阅读 · 0 评论 -
获取操作系统版本
Function GetWindowsVersion: String;var AWin32Version: Extended; os:string;begin os:=Windows ; AWin32Version := StrtoFloat(format(%d.%d ,[Win32MajorVersion, Win32MinorVersion]));转载 2010-02-16 14:12:00 · 483 阅读 · 0 评论 -
遍历文件夹及子文件夹
{-------------------------------------------------------------------------------过程名: MakeFileList 遍历文件夹及子文件夹参数: Path,FileExt:string 1.需要遍历的目录 2.要遍历的文件扩展名返回值: TStringList Eg:ListBox1.Items:= Ma转载 2010-02-18 13:28:00 · 529 阅读 · 0 评论 -
16 进制转换为 10进制
Delphi 中 16 进制数以 $ 为前缀,所以将 16 进制形式的字符串转换为整数即可:function HexToDec(const AHexString: String): Integer;begin// 16 进制转换为 10 进制;Result := StrToInt(’$’ + AHexString);end;转载 2010-02-18 13:26:00 · 792 阅读 · 0 评论 -
最小化到托盘
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 · 632 阅读 · 0 评论 -
利用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 · 3049 阅读 · 0 评论 -
修改文件夹时间
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 · 1353 阅读 · 0 评论 -
限制录入汉字和小写字符
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 · 561 阅读 · 0 评论 -
判断数字和日期需要的字符
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 · 340 阅读 · 0 评论 -
窗体在最上层
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 · 795 阅读 · 0 评论 -
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 · 1223 阅读 · 2 评论