Change of Active Window

Professional Windows® software to communicate with CAN and CAN FD busses and its add-ins: Plotter, CANdb Import, Instruments Panel, and J1939
Post Reply
Krishna.skt
Posts: 21
Joined: Mon 6. Apr 2020, 15:33

Change of Active Window

Post by Krishna.skt » Sun 24. May 2020, 16:50

Hello,

I was trying to make different files active at a different time. To be more specific, i want to make .ipf file(window) active after certain time my macro has started and Change it later again. I mean, I want to see my .ipf file as a active window for a certain period of time and later back to my original .pem file. How can i achieve this. I tried different methods from help section but i could not achieve the required result.
Thank you in Advance.

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: Change of Active Window

Post by M.Heidemann » Mon 25. May 2020, 15:04

Hello Krishna,

You can try the following example, if your document is open you can do this:

Code: Select all

Sub IsActiveExample()

   Dim myDocument
	Set MyDocument = Documents("YourExampleDocument.Doc") 
	myDocument.ActiveWindow.IsActive = True

End Sub
Where "YourExampleDocument.Doc" is the name of the document you want to switch to.

So, first switch to the desired .ipf and after X seconds (You could use the "Wait" function) switch back to your .pem.


Best Regards


Marvin
---
Marvin Heidemann
PEAK-Support Team

Post Reply