Главная страница
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.015 c
1-15591
_saha_
2003-01-28 21:59
2003.02.06
Есть вопросик


3-15529
Kudatsky
2003-01-21 11:49
2003.02.06
MS SQL Server и DBF-файлы


14-15869
Alex
2003-01-19 13:03
2003.02.06
TabSet


14-15926
Igit
2003-01-21 09:09
2003.02.06
Надо проверить...


14-15905
Programist21
2003-01-08 09:26
2003.02.06
Файл или БД