Is it possible to activate a tab in another program using an IntPtr?

后端 未结 3 1144
萌比男神i
萌比男神i 2021-01-25 12:15

Thanks in advance.

Is it possible to activate a tab in another program using an IntPtr? If so, how?

SendKeys is not an option.

Perhaps what I need is a

3条回答
  •  清歌不尽
    2021-01-25 13:10

    In addition to the answer from Garath, you might also want to investigate the Windows automation API's i.e. the technology used to implement coded UI tests for GUI applications. As part of regular functional testing, I routinely control an external application from a set of NUnit tests using these API's.

    Tools like UIAVerify will give you an indication of what controls are available in the application and you can use the Invoke Pattern (and many others) to interact with the controls at run-time.

    If you want a detailed example of how to use the automation API's, the open source TestStack White project is pretty handy.

提交回复
热议问题