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

Вниз

Как узнать предыдущий фокус   Найти похожие ветки 

 
Mars   (2004-11-04 15:25) [0]

Необходимо при клике на CheckBox"e
узнать, с какого контрола переходит фокус.

Кто знает, помогите.


 
Семен Сорокин ©   (2004-11-04 15:31) [1]

В OnExit для фокусных элементов поместить, OldObject := TControl(Sender);, где OldObject - переменная формы типа TControl и будет тебе счастье.


 
Digitman ©   (2004-11-04 15:32) [2]

The WM_SETFOCUS message is sent to a window after it has gained the keyboard focus.

WM_SETFOCUS  
hwndLoseFocus = (HWND) wParam; // handle of window losing focus


Parameters

hwndLoseFocus

Value of wParam. Identifies the window that has lost the keyboard focus (may be NULL).



Return Values

An application should return zero if it processes this message.

Remarks

To display a caret, an application should call the appropriate caret functions when it receives the WM_SETFOCUS message.


 
Rem ©   (2004-11-04 15:34) [3]

Назначить OnExit для нужных контролов:


type
 TForm1 = class(TForm)
 private
   FLastControl: TControl;
   ...
 end;

procedure TForm1.OnExit(Sender: TObject);
begin
 FLastControl := TControl(Sender);
end;



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

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

Наверх




Память: 0.47 MB
Время: 0.054 c
4-1097258912
Дубинин Алексей
2004-10-08 22:08
2004.11.21
Поиск всех каталогов по выбранной маске, Рекурсия.


1-1099729064
Ms.Dunkul
2004-11-06 11:17
2004.11.21
Как изменять мышью размеры форм не bsSizeable


4-1097576029
drew
2004-10-12 14:13
2004.11.21
Здраствуйте, подскажите как можно программно заблокировать WinXP


1-1099632990
cautur
2004-11-05 08:36
2004.11.21
Горячие клавиши


1-1099258670
Mr.Devil
2004-11-01 00:37
2004.11.21
Поток в потоке...