Hi. It may look my question is already in the FAQ. But it is not.
I need to open (i.e.) a pdf file.
I would use (Ctrl C Ctrl V from FAQ)
iHandle:=ShellExecute(0, 'Open', PChar('c:\ADoc.pdf'), PChar(''), PChar(''), SW_Hide);
The returned value "is said" to be the handle.
If so, I would then use
PostMessage( iHandle, WM_CLOSE, 0 , 0);
But it doesn't work.
Instead, if I use PostMessage( Form1.Handle , WM_CLOSE, 0 , 0);
it works perfectly.
Do you have suggestions ?
Thanks in advance.
Giovanni
Italy.
I need to open (i.e.) a pdf file.
I would use (Ctrl C Ctrl V from FAQ)
iHandle:=ShellExecute(0, 'Open', PChar('c:\ADoc.pdf'), PChar(''), PChar(''), SW_Hide);
The returned value "is said" to be the handle.
If so, I would then use
PostMessage( iHandle, WM_CLOSE, 0 , 0);
But it doesn't work.
Instead, if I use PostMessage( Form1.Handle , WM_CLOSE, 0 , 0);
it works perfectly.
Do you have suggestions ?
Thanks in advance.
Giovanni
Italy.