Delphi implementation Right bottom corner taskbar function

Source: Internet
Author: User

The implementation software in the lower right corner of the taskbar is very simple, only need to use the Ttrayicon control, the code as long as one sentence can be.
Specify a tray icon for several uses:
1, design time selection;
2, put a Ticon object to it;
3, using the current program icon: trayicon1.icon: = Application.icon;
4, Trayicon1.setdefaulticon; This also uses the current program icon.
The general use of this function is like QQ, close the QQ interface, will automatically shrink to the bottom right of the desktop taskbar, code as follows;

procedure TFormMain.FormCloseQuery(Sender: TObject; var CanClose: Boolean);beginTrayIcon1.Icon:=Application.Icon;FormMain.Visible:=False;    if CloseFlag<>4 then //判断是不是要真正退出beginCanClose:=False;endelsebeginCanClose:=True;end;end;

The other properties of the Ttrayicon control are well understood and can be explored if you are interested.

Delphi implementation Right bottom corner taskbar function

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.