만약 작업표시줄에 익스플로어2개와 하나의 프로그램이 실행 되어있을때
익스플로어를 클릭하면 프로그램은 비활성이 되는데요 이때 프로그램이
비활성일때와 다시 프로그램을 클릭해서 활성상태가 될때 이것을
프로그램안에서 if문으로 판단하고 싶은데요 어떠한 이벤트를 넣어야
하나요? 통 감이 안오네요..어떤분은 deActivate와 Activate로 할수있다는데
잘 안되네요 if문으로 판단하고 싶어요
또한가지..
idftp로 파일을 수신받을때 get(실행파일명,복사해올폴더,true);
이런식으로 사용하면 꼭 루트밑에 그 폴더가 존재해야 하는데
만약 idftp실행파일이 다른곳에 있으면 그 idftp파일이 있는 폴더로
다운로드 할려면 어떻게 해야 할까요?
부탁드립니다
---------------------------------------------------------------------
선언부
---------------------------------------------------------------------
private
{ Private declarations }
procedure Get_Active(var Msg: TMessage); message WM_ACTIVATE;
---------------------------------------------------------------------
procedure TForm1.Get_Active(var Msg: TMessage);
begin
inherited;
if LOWORD(Msg.wParam) = WA_INACTIVE then
Caption := 'Inactive'
else if LOWORD(Msg.wParam) = WA_CLICKACTIVE then
Caption := 'ClickActive'
else
Caption := 'Active';
end;
---------------------------------------------------------------------
참고사항
WM_ACTIVATE
fActive = LOWORD(wParam); // activation flag
fMinimized = (BOOL) HIWORD(wParam); // minimized flag
hwndPrevious = (HWND) lParam; // window handle
Parameters
fActive
Value of the low-order word of wParam. Specifies whether the window is being activated or deactivated. This parameter can be one of the following values:
Value Meaning
WA_ACTIVE Activated by some method other than a mouse click (for example, by a call to the SetActiveWindow function or by use of the keyboard interface to select the window).
WA_CLICKACTIVE Activated by a mouse click.
WA_INACTIVE Deactivated.
fMinimized
Value of the high-order word of wParam. Specifies the minimized state of the window being activated or deactivated. A nonzero value indicates the window is minimized.
hwndPrevious
Value of lParam. Identifies the window being activated or deactivated, depending on the value of the fActive parameter. If the value of fActive is WA_INACTIVE, hwndPrevious is the handle of the window being activated. If the value of fActive is WA_ACTIVE or WA_CLICKACTIVE, hwndPrevious is the handle of the window being deactivated. This handle can be NULL.
Return Values
If an application processes this message, it should return zero.
Default Action
If the window is being activated and is not minimized, the DefWindowProc function sets the keyboard focus to the window.