I want to be able to take a screenshot of my chart from within my indicator. I have been able to get it partially correct by using a handle to GetForeGroundWindow(), creating a rect, etc and this works.
The part that I am stuck on is that if my chart is not the foreground window, or not the active window my screenshot is of some other window.
If tried to use the function SetForeGroundWindow() but it relies on knowing your own window handle. Ive tried to get the handle using this.Handle but that doesnt compile.
Could anybody tell me how to set the chart window from which my indicator is running to be the foreground window? or maybe some other method of getting the screenshot?
Thanks.
Comment