activate chart window

 

Hi,


how to active / put focus a chart window if another is activated?

Solutions with WindowHandle() and ShowWindow() or SetFocus() didn't work for me, may be you can help.

Thanks for your help.


best regards,

Daniel.

 
*bump*
 
tradeigel:

how to active / put focus a chart window if another is activated?

Solutions with WindowHandle() and ShowWindow() or SetFocus() didn't work for me, may be you can help.

Place your code here and someone will help you.
 

Hi Rosh,


thanks for answering. It's not about a special piece of code.

For example this script:


int start()

{

  Sleep(3000);

  ActivateCurrentChart();

}


void ActivateCurrentChart()

{

  ...

}


When this script is run you manually open a new chart and after 3 seconds it should reactivate / reopen / focus the chart (window) the script was attached to.


Which function from user32.dll is appropriate for this kind of purpose?

Can one send a WindowMessage to the chart window to activate it? That's what I tried but since I am very unexperienced when it comes to windowsAPI programming, I am stuck.


Thanks for your feedback.