Delphi 输入年月判断天数

2022-12-30 12:42:30 作者:admin

本文整理自网络,侵删。

 //需要引用dateutils;
 
unit Unit1;
interface
uses  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,  Dialogs,dateutils, StdCtrls;
type  TForm1 = class(TForm)    Label1: TLabel;    Label2: TLabel;    Label3: TLabel;    Edit_nian: TEdit;    Edit_yue: TEdit;    Button1: TButton;    procedure Button1Click(Sender: TObject);  private    { Private declarations }  public    { Public declarations }  end;
var  Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);beginlabel3.caption := inttostr(DaysInAMonth(strtoint(Edit_nian.text),strtoint(Edit_yue.text)));end;
end.

相关阅读 >>

Delphi xe5电脑录像功能

Delphi winsock远程唤醒计算机的函数

Delphi使用idhttp模拟提交页面方法总结

Delphi 在桌面中嵌入窗体

Delphi 根据进程名称获取进程号

Delphi tstringlist的用法

Delphi 字符串查找替换函数

Delphi中输入法模式imemode属性的解释

Delphi判断一个字符是否为汉字的最佳方法

Delphi 遍历类中的属性

更多相关阅读请进入《Delphi》频道 >>



在线咨询 拨打电话