CodePudding user response:
Put a TPrintDialog, then:If PrintDialog1. Execute then
The begin
ShowMessage (' you are printing ');
end;
CodePudding user response:
1, FindWindow click title search form2, GetWindowThreadProcessId according to window handle, the thread ID
3, the SetWindowsHookEx hook window events
CodePudding user response:
Before one altar friend also asked the same question,Generally not recommended for use the method of the upstairs Windows,
Because you call Report is controls, as long as it is the source code, you can modify the source code to do judgment, there is no need for around a big circle
Interested, of course, also have time to study Windows method, technology does not hurt the body