ShellExecute and focus lose
-
Hi, Everytime I use
ShellExecute
to open a web page I lose the focus from the parent program (caller if the ShellExecute). Is there any way to open the page silently in the background or to regain focus back to the caller ? Regards,sdancer75
Try this: BringWindowToTop[^]
The difficult we do right away... ...the impossible takes slightly longer.
-
Try this: BringWindowToTop[^]
The difficult we do right away... ...the impossible takes slightly longer.
-
Hi, Everytime I use
ShellExecute
to open a web page I lose the focus from the parent program (caller if the ShellExecute). Is there any way to open the page silently in the background or to regain focus back to the caller ? Regards,sdancer75
How are you calling
ShellExecute()
?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
How are you calling
ShellExecute()
?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
Hi, I am calling
ShellExecute
like that :ShellExecute(NULL, "open", strURL ,NULL,NULL,SW_SHOWMINNOACTIVE);
Where strURL is the URL address to open. Regards,
sdancer75
Have you tried other values for
nShowCmd
?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
Have you tried other values for
nShowCmd
?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
Have you tried other values for
nShowCmd
?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
Hi, I found out accidentally, that using the
SetWindowPos
to the MainFrm window inside theOnCreateClient
it solves the problem. It seems that setting the attribute that does not change the Z-Order of the main window keeps it always in the top.SetWindowPos(NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_FRAMECHANGED);
What do you think ? Regards,
sdancer75