Вниз
Скачать: CL | DM;

pressed всегда истина хотя на самом деле нет. Почему?   Найти похожие ветки 

← →
artist ©   (2003-06-25 16:35) [0]

procedure TForm1.myhoook(var Message: TMessage);
var
ihandle, handle1: HWND;
t: string;
ihdc: hdc;
begin
count:=0;
ihandle:=FindWindow(nil,"Adobe Illustrator");
if ihandle<>0 then
begin
EnumWindows(@EnumWindowsProc,0);
GetWindowRect(ihandle, Rct);

ihdc:=GetDC(ihandle);

if ( GetSysColor(COLOR_BTNFACE)=GetPixel(ihdc, 4, 4)) then pressed:=false else pressed:=true;

releaseDC(ihandle, ihdc);
end;


if pressed=true then
begin
Edit1.Font.Color:=clWindowText;
handle1:=FindWindow(nil,"Color");
total:=0;
flag:=false;
count:=0;

if handle1<>0 then
begin
t:=GetText(handle1);
enumChildWindows(handle1, @ChldWin, 0);
end;

t:=FloattoStr(total);
if (total>(StrToFloat(InkLimit))) then Edit1.Font.Color:=clRed;
Edit1.Text:=t;
end;
pressed:=false;
end;


← →
artist ©   (2003-06-25 16:55) [1]

При этом таже процедура но по Button1Click работает как положено. Без проблем.


← →
clickmaker ©   (2003-06-25 17:49) [2]

А вообще по какому событию эта процедура должна срабатывать?


← →
artist ©   (2003-06-25 20:30) [3]

Все. Вопрос решен. Разобрался. Дело не в процедуре. Я неправильно переменные объявил. Локальные вместо глобальных.



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

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.007 c
1-92117
Fenixx
2003-08-15 14:08
2003.08.28
Импорт данных из текстового файла в БД


3-92001
rosl
2003-08-05 03:10
2003.08.28
запрос sql


14-92176
Zhenka
2003-08-11 12:30
2003.08.28
Соитие файлов


14-92257
dataMaster
2003-08-09 09:53
2003.08.28
Delphi 3 Professional


11-92085
Ал
2002-12-21 22:33
2003.08.28
Как выключить текстовый курсор KOLRichEdit в readonly?




   Наверх