티스토리 뷰
http://docwiki.embarcadero.com/CodeExamples/Rio/en/TTrayIcon_(Delphi)
TTrayIcon (Delphi) - RAD Studio Code Examples
Description This example uses a tray icon and an application events component on a form. When the application runs, it loads the tray icon, the icons displayed when it is animated, and it also sets up a hint balloon. When you minimize the window, the form
docwiki.embarcadero.com
This example uses a tray icon and an application events component on a form.
When the application runs, it loads the tray icon, the icons displayed when it is animated, and it also sets up a hint balloon. When you minimize the window, the form is hidden, a hint balloon shows up, and the tray icon is displayed and animated. Double-clicking the system tray icon restores the window.
--
procedure TForm1.ApplicationEvents1Minimize(Sender: TObject);
begin
{ Hide the window and set its state variable to wsMinimized. }
Hide();
WindowState := wsMinimized;
{ Show the animated tray icon and also a hint balloon. }
TrayIcon1.Visible := True;
TrayIcon1.Animate := True;
TrayIcon1.ShowBalloonHint;
end;
--
procedure TForm1.FormCreate(Sender: TObject);
var
MyIcon : TIcon;
begin
{ Load the tray icons. }
TrayIcon1.Icons := TImageList.Create(Self);
MyIcon := TIcon.Create;
MyIcon.LoadFromFile('icons/earth1.ico');
TrayIcon1.Icon.Assign(MyIcon);
TrayIcon1.Icons.AddIcon(MyIcon);
MyIcon.LoadFromFile('icons/earth2.ico');
TrayIcon1.Icons.AddIcon(MyIcon);
MyIcon.LoadFromFile('icons/earth3.ico');
TrayIcon1.Icons.AddIcon(MyIcon);
MyIcon.LoadFromFile('icons/earth4.ico');
TrayIcon1.Icons.AddIcon(MyIcon);
{ Set up a hint message and the animation interval. }
TrayIcon1.Hint := 'Hello World!';
TrayIcon1.AnimateInterval := 200;
{ Set up a hint balloon. }
TrayIcon1.BalloonTitle := 'Restoring the window.';
TrayIcon1.BalloonHint :=
'Double click the system tray icon to restore the window.';
TrayIcon1.BalloonFlags := bfInfo;
end;
--
procedure TForm1.TrayIcon1DblClick(Sender: TObject);
begin
{ Hide the tray icon and show the window,
setting its state property to wsNormal. }
TrayIcon1.Visible := False;
Show();
WindowState := wsNormal;
Application.BringToFront();
end;
'VCL' 카테고리의 다른 글
(i) Delphi - KSNetPOSLib ActiveX(ocx) 등록하기 (0) | 2020.07.23 |
---|---|
(2019-12-27) (i) Almediadev StyleControls - DEMOs (0) | 2019.12.27 |
(URL) Media Player VLC ActiveX Delphi tutorial (0) | 2019.08.29 |
(URL) ROUND / TRUNC / MOD on DELPHI (0) | 2019.08.26 |
(i) How to use TnrComm component on delphi (0) | 2019.08.20 |
- Total
- Today
- Yesterday
- Unable to load project
- 솔로몬시스템
- KSNetPOSLib.ocx
- 비에이블스터디카페
- 식권발매
- Android 64
- DelphiZeroMQ
- solomonsystem
- mysql db 복구
- 키오스크
- Grijjy
- Firemonkey
- TT쿼리
- 솔로원DB복제
- 앱관리자
- FMX
- 안드로이드_관리자
- READ_PRIVILEGED_PHONE_STATE
- delphi push message
- SOLO1ASP
- Could not convert variant of type (Null) into type (OleStr)
- WidevineID
- 안드로이드관리자
- KSNetPOSLib
- RADStudio11
- Delphi
- 스터디카페
- 비에이블
- push server
- .dproj
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |