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;

  • 相关阅读:
    request内置对象
    JSP页面、包含
    HTTP协议
    html简介
    数据访问层工具类
    数据运算
    可变于不可变对象分类
    有序 无序 的区别
    字符串方法
    day01_final
  • 原文地址:https://www.cnblogs.com/angelbd/p/3373078.html
Copyright © 2011-2022 走看看