Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.02.06;
Скачать: CL | DM;

Вниз

проблема при свертывании в трей   Найти похожие ветки 

 
Zhenya_g   (2002-12-22 15:02) [0]

При попытке свернуть окно в трей появляется ошибка
[Error] Unit1.pas(22): Undeclared identifier: "TNotifyIconData"


текст программы

unit Unit2;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
Procedure Ic(n:Integer;Icon:TIcon);
private
{ Private declarations }
public
{ Public declarations }
protected
Procedure ControlWindow(Var Msg:TMessage); message WM_SYSCOMMAND;


end;

var
Form1: TForm1;

implementation

{$R *.dfm}

Procedure TForm1.Ic(n:Integer;Icon:TIcon);
Var nim:TnotifyIcondate; {!!!!!!!!!! выдается сообщение о ошибке, что делать??? }
begin
With Nim do
Begin
cbSize:=SizeOf(Nim);
Wnd:=Form1.Handle;
uID:=1;
uFlags:=NIF_ICON or NIF_MESSAGE or NIF_TIP;
hicon:=Icon.Handle;
uCallbackMessage:=wm_user+1;
szTip:="текст";
End;
Case n OF
1: Shell_NotifyIcon(Nim_Add,@Nim);
2: Shell_NotifyIcon(Nim_Delete,@Nim);
3: Shell_NotifyIcon(Nim_Modify,@Nim);
End;
end;
Procedure TForm1.ControlWindow(Var Msg:TMessage);
Begin
IF Msg.WParam=SC_MINIMIZE then
Begin
Ic(1,Application.Icon);
ShowWindow(Handle,SW_HIDE);
ShowWindow(Application.Handle,SW_HIDE);
End else inherited;
End;

end.


 
Song ©   (2002-12-22 15:10) [1]

TNotifyIconDat a


 
Rouse_ ©   (2002-12-22 15:16) [2]

uses ...ShellAPI;

nim: TNotifyIconData;

Желаю успехов



Страницы: 1 вся ветка

Текущий архив: 2003.02.06;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.013 c
8-15764
Stelh
2002-10-23 16:09
2003.02.06
Работа с Web-камерой


9-15388
Delphi 5.01
2002-08-19 21:01
2003.02.06
Information About Game Designe (infa po sozdaniu igr kak obichni)


8-15761
Rom@n
2002-10-23 08:06
2003.02.06
Графика


3-15400
Zn
2003-01-21 10:05
2003.02.06
ADO - как вставить в SELECT ссылку на таблицу в другой БД?


1-15715
Nikolai_S
2003-01-24 18:01
2003.02.06
Как обработать событие TForm.OnShortCut ?