Citect Window position control problem

IainH

Member
Join Date
Jul 2008
Location
Sussex
Posts
44
I am attempting to set up an HMI using Citect V6 on a PC with 2 monitors. I am using a primary citect project to display the main system control pages on monitor 1 and an included project with pages displayed on monitor 2.

My main project starts with the display of a splash screen (on monitor 1) and after initialisation I create a new window using

WinNewAt("UserID", 0, 0, 16);

which subsequently uses

PageDisplay("Other_Page");

as required.

The monitor 2 window is also set up after initialisation using

WinNewAt("Second_Monitor", 0, 0, 16);
WinPos(1024, 0);


I need to use WinPos() as WinNewAt() will not position the window where I want it? :whistle:

However, my main problem is, when I execute a Login() instruction in the main project, the window on the 2nd monitor is repositioned on the first (behind the window displayed there). :mad:

Is there any way to stop this happening other than to continually check the position of the 2nd window monitor page (using the Page Event - "While page shown") and reposition it when it moves?

Iain
 
Are you using the Citect supplied multi monitor cicode

I have had to modify some functions to suit my application

Here are the statments that I call during start up to display on each monitor

How do you have your display set up ie Span (eg 2048 x 768)?


PageDisplay("Overview"); !First screen

WinNewAt("CMO0000",1024,1,0) !Second screen

 
Not sure what you mean by "Citect supplied multi monitor cicode", but if I try putting

[Multimonitors]
Monitors=2

in my citect.ini file, nothing I do makes any sense!

I am starting my project with a splash screen on monitor 1. This always has a Windows caption, so I then create a new captionless window in the initialisation routine and free the original(?):

WinNewAt("M_Splash", 0, 0, 16);
WinSelect(0);
SleepMS(500);
WinFree();


Then, after initialisation is complete,

WinNewAt("UserID", 0, 0, 16);
WinNewAt("Second_Monitor", 1024, 0, 16);


I now have the two screns where I want them and keep the second one in position by adding

If PageInfo(14) <> "1024" Then
WinPos(1024, 0)
End


In the While page shown event of the page.

It's not pretty, but it works and allows me to report some progress!

Thanks,

Iain
 
Hello,

i am not shure witch version you are using but since you found the [Multimonitors] parameter i am guessing you are using 5.50 or higher.

The integrated multimonitor functions kellian mentiond are part of the CSV_Include project (where the xp style templates are located)

if you want the first window to be caption less you can change that in the computer setup wizzard. use the custom wizzard and turn off show title bar.

Now when you want to use the integrated multimonitor support you should use "CSV_MM_PageDisplay" and "CSV_MM_WinNewat" instead of the normal "PageDisplay" these functions should position your windows correctly. it takes some tweaking but should work. Those functions are originally designed to work with the xp templates but we can get them to work on normal pages as wel.

If you are using an older verion of citect let us know and we wil find another solution.

hope this gets you on the right track

regards

Marsupilami
 
If you can access the Citect Knowledgebase there are several articles on using Multi monitors

Q4688 being one of them
 
Yes Q4688 is a good place to start, i have attached it if you have not already seen it or do not have access to it.
 

Similar Topics

I have a comparative program in M340 PLC in which when a condition is true a memory bit is set to high. I would like to Pop UP a new window every...
Replies
2
Views
2,337
Hi group! Just getting started with the Citect product and going through a training manual. The step I'm working on explains the process to...
Replies
6
Views
6,996
Hi, I'm using Citect7.20 and need to popup a modal window. By modal, I mean the user should not be able to click on parent window until he/she...
Replies
9
Views
16,135
just a quick question... On my server PC i have a number of programs running at the same time, each displaying different plant information. my...
Replies
7
Views
3,381
Is there any way in Citect to prevent windows being redrawn when a user logs in with a new priveledge level? I have a number of Citect windows...
Replies
0
Views
2,117
Back
Top Bottom