FactoryTalk View SE VB Sub to run Macro

I have two displays and need to open them at two monitors (so I have resolution 3840*1200 pixels).
I need to open display at the second one (at VBA of new displat thet I need to open I got this:
"Dim rect As POINTAPI
Call GetCursorPos(rect)
If rect.x >= 1920 Then ThisDisplay.Move (1920)"
one module with this code:
"Public Type POINTAPI
x As Long
y As Long
End Type

Public Declare Sub GetCursorPos Lib "User32" (lpPoint As POINTAPI)"

But this VBA code firstly opens new display at X = 0, Y = 0 and the old one closes when I want to hold old one on it's plase.

I hope you can understend what I'm talking about and can help me. Please)
 
The first thing to check is how you have your displays configured, if you are going to manually handle positioning and closing, make sure the display is not configured to "Replace".

Right click on an open display to get it's properties.
 

Similar Topics

Hi guys, I was wondering if anyone could help me with a little problem regarding FactoryTalk View SE (FTV). I am having problems with running...
Replies
17
Views
45,540
Hello, I'm using FactoryTalk View ME V10. I created a valve as a global object with multiple parameters and when the object is being used at the...
Replies
2
Views
129
Hello all, I was modifying an HMI in factory talk and went to change a go to display button using the ... to select from a list as I had done...
Replies
4
Views
165
Hello, We recently upgraded our control server to a newer model. After the transition we are experiencing issues with our trend graphs to where...
Replies
2
Views
120
Hi, I wanted to ask is there a way to have a visibility expression use the IP address of the HMI (Dynics, not PV) to show certain elements? The...
Replies
3
Views
200
Back
Top Bottom