I would like to create a trend in pi processbook from vba and expand it to fit the screen. How can i mimic the double click expanding functionality from vba?
Actually, there's an easier way to switch to full screen:
Application.FullScreen = True
The problem with SendKeys is that it does exactly that, sends a series of keystrokes to an application. If the application has a error message or other dialog open, then the keystrokes are sent to the dialog. It's even worse if a text symbol is being edited or the focus is in a text box control.
Do you mean when create a new tread in PI ProcessBook, instead of creating the tread by specify a size, you just want to expand the tread to cover the entire display? I would like to understand your use case as well.
If you want to show trend as maximum size (like double click), you can use Maximize method.
Some users want to display with F11 which shows full screen for all display objects. You can click F11 by Sendkeys.
Hope it helps,
Retrieving data ...