zoukankan      html  css  js  c++  java
  • (转载)在状态栏即时显示Hint

    在状态栏即时显示Hint(所有窗口,包括子窗口控件的hint)

    在主窗体中放入一个ApplicationEvents控件。
    添加如下代码。
    其中Items[***]中的***代表状态栏的各个子panel,integer类型。

    procedure TfrmMain.ApplicationEvents1Hint(Sender: TObject);
    begin
    statusbar1.Panels.Items[nInfo].Text:=Application.Hint;
    end;

    procedure TfrmMain.ApplicationEvents1Idle(Sender: TObject;
    var Done: Boolean);
    begin
    if odd(GetKeyState(VK_CAPITAL)) then
    statusbar1.Panels.Items[nCaps].text:='大写'
    else
    statusbar1.Panels.Items[nCaps].text:='';

    if odd(GetKeyState(VK_NUMLOCK)) then
    statusbar1.Panels.Items[nNum].text:='数字'
    else
    statusbar1.Panels.Items[nNum].text:='';

    statusbar1.Panels.Items[nTime].text:=
    formatdatetime('yyyy-mm-dd hh:mm',now);

    end;

  • 相关阅读:
    2019 西安邀请赛 D
    time 库
    字符串处理+格式化输出
    数据类型
    turtle1
    格式问题
    字符串1
    基础操作
    链表去重
    PAT 1093
  • 原文地址:https://www.cnblogs.com/angelbd/p/3373078.html
Copyright © 2011-2022 走看看