1、
procedure TfrmMain.showform(FormClass: TFormClass);
var
  i: integer;
begin
  for i := 0 to self.MDIChildCount - 1 do
    if (MDIChildren[i] is FormClass) then
    begin
      self.MDIChildren[i].BringToFront;
     // sendmessage(MDIChildren[i].handle,wm_syscommand,SC_RESTORE,0);
      MDIChildren[i].SetFocus;
      Exit;
    end;
  FormClass.Create(self);
end;调用
  showform(tfrmTbqz);2、
unit Unit1;interfaceuses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,ShellAPI,
  StdCtrls, Menus;const
  WM_TRAYNOTIFY = WM_USER+100;type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
    procedure TrayNotifyMessage(var Sender: TMessage); message WM_TRAYNOTIFY;
    procedure MarkTaskBarIcon(Sender: TObject);
  public
    { Public declarations }
  end;var
  Form1: TForm1;
  tnd : TNOTIFYICONDATA;
implementation{$R *.DFM}procedure TForm1.FormCreate(Sender: TObject);
begin
   Application.OnMinimize := MarkTaskBarIcon;
end;procedure TForm1.MarkTaskBarIcon(Sender: TObject);
begin
   Form1.Visible := False;
   tnd.cbSize := sizeof(tnd);
   tnd.Wnd := Handle;
   tnd.uID := 128;
   tnd.uFlags := NIF_MESSAGE or NIF_ICON or NIF_TIP;
   tnd.uCallbackMessage := WM_TRAYNOTIFY;
   tnd.hIcon := Application.Icon.Handle;
   StrPCopy(tnd.szTip,Application.Title);
   Shell_NotifyIcon(NIM_ADD,@tnd);
end;procedure TForm1.TrayNotifyMessage(var Sender: TMessage);
begin
   if Sender.LParam = WM_LBUTTONDBLCLK then
  begin
    Shell_NotifyIcon(NIM_DELETE,@tnd);
    Form1.Visible := True;
    Application.Restore;
    Application.BringToFront;
  end;
     if  wm_size=1 then
     
end;end.

解决方案 »

  1.   

    1、
    procedure TfrmMain.showform(FormClass: TFormClass);
    var
      i: integer;
    begin
      for i := 0 to self.MDIChildCount - 1 do
        if (MDIChildren[i] is FormClass) then
        begin
          self.MDIChildren[i].BringToFront;
         // sendmessage(MDIChildren[i].handle,wm_syscommand,SC_RESTORE,0);
          MDIChildren[i].SetFocus;
          Exit;
        end;
      FormClass.Create(self);
    end;调用
      showform(tfrmTbqz);2、
    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,ShellAPI,
      StdCtrls, Menus;const
      WM_TRAYNOTIFY = WM_USER+100;type
      TForm1 = class(TForm)
        procedure FormCreate(Sender: TObject);
      private
        { Private declarations }
        procedure TrayNotifyMessage(var Sender: TMessage); message WM_TRAYNOTIFY;
        procedure MarkTaskBarIcon(Sender: TObject);
      public
        { Public declarations }
      end;var
      Form1: TForm1;
      tnd : TNOTIFYICONDATA;
    implementation{$R *.DFM}procedure TForm1.FormCreate(Sender: TObject);
    begin
       Application.OnMinimize := MarkTaskBarIcon;
    end;procedure TForm1.MarkTaskBarIcon(Sender: TObject);
    begin
       Form1.Visible := False;
       tnd.cbSize := sizeof(tnd);
       tnd.Wnd := Handle;
       tnd.uID := 128;
       tnd.uFlags := NIF_MESSAGE or NIF_ICON or NIF_TIP;
       tnd.uCallbackMessage := WM_TRAYNOTIFY;
       tnd.hIcon := Application.Icon.Handle;
       StrPCopy(tnd.szTip,Application.Title);
       Shell_NotifyIcon(NIM_ADD,@tnd);
    end;procedure TForm1.TrayNotifyMessage(var Sender: TMessage);
    begin
       if Sender.LParam = WM_LBUTTONDBLCLK then
      begin
        Shell_NotifyIcon(NIM_DELETE,@tnd);
        Form1.Visible := True;
        Application.Restore;
        Application.BringToFront;
      end;
         if  wm_size=1 then
         
    end;end.
      

  2.   

    1,if form1 <> nil then form1 := Tfrom1.create()//保证窗体只创建一次
    2,去找控件,有很多
      

  3.   

    楼上的错了吧
    1。if form1 = nil then form1 := Tfrom1.create()
    2。
    给你个例子如下::
    程序缩小为任务条右下角的小图标
    某些程序运行启动后并不出现在任务条中,而是缩小为任务条右下角的一个小图标,当鼠标移到这个小图标上时会出现一些提示信息、单击该小图标会执行一些特定的操作。便如任务条右下角的小喇叭图标,单击它会弹出一个简单的音量控制条,双击会启动另一个更大的音量控制程序。在Shell32.DLL动态链接库中包括一个函数Shell_NotifyIconA()可通知Windows在任务条右下角加入一个小图标,可惜该函数的详细说明未收入Delphi的帮助文档中,下面以一个简单的实例来说明如果使用该函数。
    unit Unit1;
    interface
    { 记住在uses部分中包括 ShellAPI}usesWindowsMessagesSysUtilsClassesGraphicsControlsFormsDialogsShellAPIStdCtrls;
    {自定义消息,当小图标捕捉到鼠标事件时Windows向回调函数发送此消息}const MY_MESSAGE = WM_USER + 100;
    typeTForm1 = class(TForm)procedure FormCreate(Sender: TObject);procedure FormClose(Sender: TObject; var Action: TCloseAction);procedure FormPaint(Sender: TObject);privateprocedure OnIconNotify(var Message: TMessage);message MY_MESSAGE;public{ Public declarations }end;
    varForm1: TForm1;
    implementation
    {$R *.DFM}{当小图标捕捉到鼠标事件时进入此过程}procedure TForm1.OnIconNotify(var Message: TMessage);constBusy: Boolean = false;beginif not Busy then beginBusy := true;if Message.LParam=WM_LBUTTONDOWN thenif Application.MessageBox('Are you sure'
    'Exit'MB_YESNO)=IDYES then Close;Busy := false;end;end;
    {当主Form建立时通知Windows加入小图标}procedure TForm1.FormCreate(Sender: TObject);varnid: TNotifyIconData;beginnid.cbSize := sizeof(nid); // nid变量的字节数nid.Wnd := Handle; // 主窗口句柄nid.uID := -1; // 内部标识,可设为任意数nid.hIcon := Application.Icon.Handle; // 要加入的图标句柄,可任意指?nid.hIcon := Application.Icon.Handle; // 要加入的图标句柄,可任意指?
    nid.szTip := 'This is a test application'; // 提示字符串nid.uCallbackMessage := MY_MESSAGE; // 回调函数消息nid.uFlags := NIF_ICON or NIF_TIP or NIF_MESSAGE; // 指明哪些字段有?
    if not Shell_NotifyIcon(NIM_ADD@nid) then beginShowMessage('Failed!');Application.Terminate;end;{将程序的窗口样式设为TOOL窗口,可避免在任务条上出现}SetWindowLong(Application.HandleGWL_EXSTYLEWS_EX_TOOLWINDOW);end;
    {程序被关闭时通知Windows去掉小图标}procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);varnid: TNotifyIconData;beginnid.cbSize := sizeof(nid); // nid变量的字节数nid.cbSize := sizeof(nid); // nid变量的字节数nid.uID := -1; //内部标识,与加入小图标时的数一致nid.Wnd := Handle; //主窗口句柄Shell_NotifyIcon(NIM_DELETE@nid); //去掉小图标Shell_NotifyIcon(NIM_DELETE@nid); //去掉小图标end;
    {主窗口初始化完毕并显示时将激活Paint重画事件,此时将主窗口隐藏}procedure TForm1.FormPaint(Sender: TObject);beginHide;end;
    end.
      

  4.   

    楼上的错了吧
    1。if form1 = nil then form1 := Tfrom1.create()
    2。
    给你个例子如下::
    程序缩小为任务条右下角的小图标
    某些程序运行启动后并不出现在任务条中,而是缩小为任务条右下角的一个小图标,当鼠标移到这个小图标上时会出现一些提示信息、单击该小图标会执行一些特定的操作。便如任务条右下角的小喇叭图标,单击它会弹出一个简单的音量控制条,双击会启动另一个更大的音量控制程序。在Shell32.DLL动态链接库中包括一个函数Shell_NotifyIconA()可通知Windows在任务条右下角加入一个小图标,可惜该函数的详细说明未收入Delphi的帮助文档中,下面以一个简单的实例来说明如果使用该函数。
    unit Unit1;
    interface
    { 记住在uses部分中包括 ShellAPI}usesWindowsMessagesSysUtilsClassesGraphicsControlsFormsDialogsShellAPIStdCtrls;
    {自定义消息,当小图标捕捉到鼠标事件时Windows向回调函数发送此消息}const MY_MESSAGE = WM_USER + 100;
    typeTForm1 = class(TForm)procedure FormCreate(Sender: TObject);procedure FormClose(Sender: TObject; var Action: TCloseAction);procedure FormPaint(Sender: TObject);privateprocedure OnIconNotify(var Message: TMessage);message MY_MESSAGE;public{ Public declarations }end;
    varForm1: TForm1;
    implementation
    {$R *.DFM}{当小图标捕捉到鼠标事件时进入此过程}procedure TForm1.OnIconNotify(var Message: TMessage);constBusy: Boolean = false;beginif not Busy then beginBusy := true;if Message.LParam=WM_LBUTTONDOWN thenif Application.MessageBox('Are you sure'
    'Exit'MB_YESNO)=IDYES then Close;Busy := false;end;end;
    {当主Form建立时通知Windows加入小图标}procedure TForm1.FormCreate(Sender: TObject);varnid: TNotifyIconData;beginnid.cbSize := sizeof(nid); // nid变量的字节数nid.Wnd := Handle; // 主窗口句柄nid.uID := -1; // 内部标识,可设为任意数nid.hIcon := Application.Icon.Handle; // 要加入的图标句柄,可任意指?nid.hIcon := Application.Icon.Handle; // 要加入的图标句柄,可任意指?
    nid.szTip := 'This is a test application'; // 提示字符串nid.uCallbackMessage := MY_MESSAGE; // 回调函数消息nid.uFlags := NIF_ICON or NIF_TIP or NIF_MESSAGE; // 指明哪些字段有?
    if not Shell_NotifyIcon(NIM_ADD@nid) then beginShowMessage('Failed!');Application.Terminate;end;{将程序的窗口样式设为TOOL窗口,可避免在任务条上出现}SetWindowLong(Application.HandleGWL_EXSTYLEWS_EX_TOOLWINDOW);end;
    {程序被关闭时通知Windows去掉小图标}procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);varnid: TNotifyIconData;beginnid.cbSize := sizeof(nid); // nid变量的字节数nid.cbSize := sizeof(nid); // nid变量的字节数nid.uID := -1; //内部标识,与加入小图标时的数一致nid.Wnd := Handle; //主窗口句柄Shell_NotifyIcon(NIM_DELETE@nid); //去掉小图标Shell_NotifyIcon(NIM_DELETE@nid); //去掉小图标end;
    {主窗口初始化完毕并显示时将激活Paint重画事件,此时将主窗口隐藏}procedure TForm1.FormPaint(Sender: TObject);beginHide;end;
    end.
      

  5.   

    楼上的错了吧
    1。if form1 = nil then form1 := Tfrom1.create()
    2。
    给你个例子如下::
    程序缩小为任务条右下角的小图标
    某些程序运行启动后并不出现在任务条中,而是缩小为任务条右下角的一个小图标,当鼠标移到这个小图标上时会出现一些提示信息、单击该小图标会执行一些特定的操作。便如任务条右下角的小喇叭图标,单击它会弹出一个简单的音量控制条,双击会启动另一个更大的音量控制程序。在Shell32.DLL动态链接库中包括一个函数Shell_NotifyIconA()可通知Windows在任务条右下角加入一个小图标,可惜该函数的详细说明未收入Delphi的帮助文档中,下面以一个简单的实例来说明如果使用该函数。
    unit Unit1;
    interface
    { 记住在uses部分中包括 ShellAPI}usesWindowsMessagesSysUtilsClassesGraphicsControlsFormsDialogsShellAPIStdCtrls;
    {自定义消息,当小图标捕捉到鼠标事件时Windows向回调函数发送此消息}const MY_MESSAGE = WM_USER + 100;
    typeTForm1 = class(TForm)procedure FormCreate(Sender: TObject);procedure FormClose(Sender: TObject; var Action: TCloseAction);procedure FormPaint(Sender: TObject);privateprocedure OnIconNotify(var Message: TMessage);message MY_MESSAGE;public{ Public declarations }end;
    varForm1: TForm1;
    implementation
    {$R *.DFM}{当小图标捕捉到鼠标事件时进入此过程}procedure TForm1.OnIconNotify(var Message: TMessage);constBusy: Boolean = false;beginif not Busy then beginBusy := true;if Message.LParam=WM_LBUTTONDOWN thenif Application.MessageBox('Are you sure'
    'Exit'MB_YESNO)=IDYES then Close;Busy := false;end;end;
    {当主Form建立时通知Windows加入小图标}procedure TForm1.FormCreate(Sender: TObject);varnid: TNotifyIconData;beginnid.cbSize := sizeof(nid); // nid变量的字节数nid.Wnd := Handle; // 主窗口句柄nid.uID := -1; // 内部标识,可设为任意数nid.hIcon := Application.Icon.Handle; // 要加入的图标句柄,可任意指?nid.hIcon := Application.Icon.Handle; // 要加入的图标句柄,可任意指?
    nid.szTip := 'This is a test application'; // 提示字符串nid.uCallbackMessage := MY_MESSAGE; // 回调函数消息nid.uFlags := NIF_ICON or NIF_TIP or NIF_MESSAGE; // 指明哪些字段有?
    if not Shell_NotifyIcon(NIM_ADD@nid) then beginShowMessage('Failed!');Application.Terminate;end;{将程序的窗口样式设为TOOL窗口,可避免在任务条上出现}SetWindowLong(Application.HandleGWL_EXSTYLEWS_EX_TOOLWINDOW);end;
    {程序被关闭时通知Windows去掉小图标}procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);varnid: TNotifyIconData;beginnid.cbSize := sizeof(nid); // nid变量的字节数nid.cbSize := sizeof(nid); // nid变量的字节数nid.uID := -1; //内部标识,与加入小图标时的数一致nid.Wnd := Handle; //主窗口句柄Shell_NotifyIcon(NIM_DELETE@nid); //去掉小图标Shell_NotifyIcon(NIM_DELETE@nid); //去掉小图标end;
    {主窗口初始化完毕并显示时将激活Paint重画事件,此时将主窗口隐藏}procedure TForm1.FormPaint(Sender: TObject);beginHide;end;
    end.
      

  6.   


    1.If not assigned(Form1) then 窗体创建
    窗体退出的时候,要form1:=nil;就可以了2到深度探险去找控件
      

  7.   

    1.
    if Assigned(ChildForm) then  
    //用这个函数就要记着在Form的onClose中加一句Childform:=nil;
      childform.BringToFront
    else
    begin
      childform:=TChildForm.Create(Application);
      childform.shom;
    end;
    2.
    先定义
    count
      WM_MyICON=WM_USER+200;
    private
      iconp:PNotifyIconData;  procedure Form1.FormCreate(sender:TObject);
    begin
      iconp := new(PNotifyIconDataA);
      iconp.cbSize := 88;
      SizeOf(PNotifyIconDataA);
      iconp.Wnd := Form1.Handle;
      iconp.hIcon := Application.Icon.Handle;
      iconp.uCallbackMessage := WM_MYICON;
      iconp.uID :=0;
      iconp.szTip :='我的状态栏程序';
      iconp.uFlags := NIF_ICON or NIF_MESSAGE or NIF_TIP;
      Shell_NotifyIcon(NIM_ADD,iconp);
    end;
    //自定义一个响应的消息过程
    procedure WMMYIcon(var Message:TMessage); message WM_MYICON;
    //实现
    procedure TForm.WMMYIcon(var Message: TMessage);
    var
      curpt:TPoint;
    begin
      if (Message.LParam = WM_RBUTTONDOWN) then
      begin
         showmessage('成功了!');
      end;
    end;
      

  8.   

    1、主窗体:
    TForm1=class(TForm)
      ...
      public
        FChild:TChildForm;
      ...
      end;创建子窗体时:
    if FChild <> nil then
      FChild := TChildForm.Create(self);
      ...implementation
     uses unit;//主窗体的单元.
    ...
    在ChildForm的OnClose事件中:TChildForm.FormClose(Sender: TObject; var Action: TCloseAction);
    begin
      MainForm.FChild := nil;
    end;2、
    unit Unit1; interface { 记住在uses部分中包括 ShellAPI} 
    uses 
    Windows, Messages, SysUtils, Classes, 
    Graphics, Controls, Forms, Dialogs, 
    ShellAPI, StdCtrls; {自定义消息,当小图标捕捉到鼠标事件时Windows向回调函数发送此消息} 
    {自定义消息,当小图标捕捉到鼠标事件时Windows向回调函数发送此消息} 
    const MY_MESSAGE = WM_USER + 100; type 
    TForm1 = class(TForm) 
    procedure FormCreate(Sender: TObject); 
    procedure FormClose(Sender: TObject; var Action: TCloseAction); 
    procedure FormPaint(Sender: TObject); 
    private 
    procedure OnIconNotify(var Message: TMessage); 
    message MY_MESSAGE; 
    public 
    { Public declarations } 
    end; var 
    Form1: TForm1; implementation {$R *.DFM} 
    {当小图标捕捉到鼠标事件时进入此过程} 
    {当小图标捕捉到鼠标事件时进入此过程} 
    procedure TForm1.OnIconNotify(var Message: TMessage); 
    const 
    Busy: Boolean = false; 
    begin 
    if not Busy then begin 
    Busy := true; 
    if Message.LParam=WM_LBUTTONDOWN then 
    if Application.MessageBox('Are you sure', 
    'Exit', MB_YESNO)=IDYES then Close; 
    Busy := false; 
    end; 
    end; {当主Form建立时通知Windows加入小图标} 
    procedure TForm1.FormCreate(Sender: TObject); 
    var 
    nid: TNotifyIconData; 
    begin 
    nid.cbSize := sizeof(nid); // nid变量的字节数 
    nid.Wnd := Handle; // 主窗口句柄 
    nid.uID := -1; // 内部标识,可设为任意数 
    nid.hIcon := Application.Icon.Handle; // 要加入的图标句柄,可任意指?
    nid.hIcon := Application.Icon.Handle; // 要加入的图标句柄,可任意指?nid.szTip := 'This is a test application'; // 提示字符串 
    nid.uCallbackMessage := MY_MESSAGE; // 回调函数消息 
    nid.uFlags := NIF_ICON or NIF_TIP or NIF_MESSAGE; // 指明哪些字段有?if not Shell_NotifyIcon(NIM_ADD, @nid) then begin 
    ShowMessage('Failed!'); 
    Application.Terminate; 
    end; 
    {将程序的窗口样式设为TOOL窗口,可避免在任务条上出现} 
    SetWindowLong(Application.Handle, GWL_EXSTYLE, WS_EX_TOOLWINDOW); 
    end; {程序被关闭时通知Windows去掉小图标} 
    procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); 
    var 
    nid: TNotifyIconData; 
    begin 
    nid.cbSize := sizeof(nid); // nid变量的字节数 
    nid.cbSize := sizeof(nid); // nid变量的字节数 
    nid.uID := -1; //内部标识,与加入小图标时的数一致 
    nid.Wnd := Handle; //主窗口句柄 
    Shell_NotifyIcon(NIM_DELETE, @nid); //去掉小图标 
    Shell_NotifyIcon(NIM_DELETE, @nid); //去掉小图标 
    end; {主窗口初始化完毕并显示时将激活Paint重画事件,此时将主窗口隐藏} 
    procedure TForm1.FormPaint(Sender: TObject); 
    begin 
    Hide; 
    end; end. 
    在implementation前声明以下函数: function RegisterServiceProcess(dwProcessID, dwType: Integer):
      Integer; stdcall; external 'KERNEL32.DLL'; 在button1的OnClick 事件中:
      RegisterServiceProcess( GetCurrentProcessID, 1 ); 在button2的OnClick 事件中:
      RegisterServiceProcess( GetCurrentProcessID, 0 );SetWindowLong(application.Handle,GWL_ExStyle,WS_EX_ToolWindow);建立快捷方式:
    const
      CCH_MAXNAME=255;
      LNK_RUN_MIN=7;
      LNK_RUN_MAX=3;
      LNK_RUN_NORMAL=1;type LINK_FILE_INFO=record
             FileName:array[0..MAX_PATH] of char;
             WorkDirectory:array[0..MAX_PATH] of char;
             IconLocation:array[0..MAX_PATH] of char;
             IconIndex:integer;
             Arguments:array[0..MAX_PATH] of char;
             Description:array[0..CCH_MAXNAME] of char;
             ItemIDList:PItemIDList;
             RelativePath:array[0..255] of char;
             ShowState:integer;
             HotKey:word;
         end;function CreateLinkFile(const info:LINK_FILE_INFO;const DestFileName:string=''):boolean;
    var
     anobj:IUnknown;
     shlink:IShellLink;
     pFile:IPersistFile;
     wFileName:widestring;
    begin
     wFileName:=destfilename;
     anobj:=CreateComObject(CLSID_SHELLLINK);
     shlink:=anobj as IShellLink;
     pFile:=anobj as IPersistFile;
     shlink.SetPath(info.FileName);
     shlink.SetWorkingDirectory(info.WorkDirectory);
     shlink.SetDescription(info.Description);
     shlink.SetArguments(info.Arguments);
     shlink.SetIconLocation(info.IconLocation,info.IconIndex);
    // shlink.SetIDList(info.ItemIDList);
     shlink.SetHotkey(info.HotKey);
     shlink.SetShowCmd(info.ShowState);
     shlink.SetRelativePath(info.RelativePath,0);
     if DestFileName='' then
      wFileName:=ChangeFileExt(info.FileName,'lnk');
     result:=succeeded(pFile.Save(pwchar(wFileName),false));
    end;
    以下是程序里的一段,可以实现无限层导入:
    procedure TForm8.LoadTreeView;
    var
      strsql,tid:string;
    begin
      try    DataModule3.ADOTable3.open;
        DataModule3.ADOTable3.Locate('DTname',RzComboBox1.Text,[lopartialkey]);
        tid:=inttostr(DataModule3.ADOTable3.FieldByName('id').value);
        strsql:='select * from T where TypeID='+tid;
        DQ.Active :=false;
        DQ.SQL.Clear ;
        DQ.SQL.Add(strsql);
        DQ.Active :=true;
        DQ.Filtered :=true;
        DQ.Filter := 'Parent=0';
        U_DiGui(0,seltv.TopItem );//从当前0层开始递归建树
      except
        showmessage('字典里没有数据!');
      end;
    end;
    procedure TForm8.U_DiGui(parentID:Cardinal;ParentNode:TTreeNode);
    var
      tmpTBData:array of TableData;
      i,j:integer;
      tmpNode:TTreeNode;begin
      j:=DQ.RecordCount;
      setlength(tmpTBData,j);//保存递规上一层结点值
      for i:=0 to j-1 do begin
        tmpTBData[i].ID := Cardinal(DQ.fieldbyname('ID').value);
        tmpTBData[i].Name  := DQ.fieldbyname('Name').value;
        tmpTBData[i].ParentID  := Cardinal(DQ.fieldbyname('Parent').value);
        DQ.Next;
      end;
      for i:=0 to j-1 do begin //递规调用建立所有结点
        tmpNode:=seltv.Items.AddChild(ParentNode,tmpTBData[i].Name);
     //   tmpNode.ImageIndex:=2;
        new(pData);
        pData^.ID:=tmpTBData[i].ID;
        tmpNode.Data:=pData;
        DQ.Filter := 'Parent=' + IntToStr(Integer(tmpTBData[i].ID));
        if DQ.RecordCount >0 then begin
          U_DiGui(tmpTBData[i].ID,tmpNode );
        end;
      end;
    end;日期
    SetLocaleInfo(GetThreadLocale, LOCALE_SSHORTDATE, PChar('yy-MM-dd'));
      SetLocaleInfo(GetThreadLocale, LOCALE_SLONGDATE, PChar('yyyy''年''M''月''d''日'''));