Applies To:
  • CitectSCADA
  • CitectHMI



Graphics Card: ATI Radeon 9000

Multi-monitor technology: Hydravision

Multi-monitor mode supported: Extended desktop

OS: Windows 2000

Citect version: 5.41 Spk B



The graphic card driver only supports Extended desktop mode, while its 7000 series only supports stretched mode in Windows 2000. As I understand, this mode allows different monitors to use different resolutions, and the windows task bar will only appear on the primary monitor. Under this mode the following problems were observed:

1. WndInfo(0) or WndInfo(1) only reports the resolution of the primary monitor (not the entire desktop)

2. If the size of the window is larger than the resolution of the monitor. If you use WinPos() to move the window beyond the primary monitor. Only the portion of the window that is within the primary monitor is shown, ie. the window is clipped within the boundary of the 1st monitor. However, if you manually drag the window to the 2nd monitor, the window will be shown normally. (not sure if this is graphics card related.)

3. For window that is smaller or equal to the resolution of the monitor, you can still use WinPos() to move it to the 2nd monitor. However, if you call WinNewAt(), WinSize(), WinMove(), WinMode() etc. to manipulate the window, the window automatically get sent back to the (-4,-4) coordinates of the primary monitor.

4. When the window is located in the 2nd monitor, calling WinSize() sometimes will result the window to be shrinked to 0 x 0 size, and disappear from the monitor.

Back then, we prevent the above problems by using the Windows 2000 driver of the 7000 series graphic card which supports Stretched desktop mode. In this mode, all monitor use the same resolution, and Window treat the two monitors as a single widescreen display and report its resolution as the combined res. of the monitors, eg. for 2 1280 x 1024 res. monitors, Windows reports 2560 x 1024 resolution for the screen area. In this mode, Citect work normally as expected.

Earlier we received an email from David Mifsud about how to get Mult-monitor working on Windows XP on Matrox card. This became a bit clear that the screen was under the stretched desktop mode settings.




1. Use a graphic card that supports stretched desktop mode, such as Matrox, Nvidia card.

2. After a bit of experimentation, we came up with a workaround to use multi-monitors under Extended desktop mode. It is purely based on the assumption that WinPos() will still work if the window is smaller and equal to the resolution of the monitor. The idea is to ensure the size of all Citect windows is smaller or equal to that of monitor. call the suggested MM_AdjustWindow() function after any Windows manipulation Cicodes, ie.

WinNewAt(), WinNew(), WinMove(), PagePopup(), TrendWin(), TrendPopup(), AssPopup(), etc.

PageDisplay(), PageGoto(), PageLast(), PageNext(), PagePrev() , PageTrend(), PageAlarm(), PageHardware(), PageFile(), etc. (they tend to resize the window back to the intended resolution of the page)

The Cicode is designed to work under the following Citect.ini settings:

WinNoScrollbars=1 ! Do not show scroll bars when window is resized

Dynamicsizing=0 ! Do not dynamically resize (rescale) page.

FUNCTION MM_AdjustWindow(INT iMonitorWidth, INT iMonitorHeight, INT iXPos, iYPos) 
IF StrToInt(PageInfo(12)) > iMonitorWidth OR StrToInt(PageInfo(13)) > iMonitorHeight THEN
        WinSize(0, 0) // Somehow this is required 
WinMove(iXPos, iYPos, iMonitorWidth, iMonitorHeight);// Resize the window including the window frame 

    // Reposition the window to destination 
IF iXPos >= iMonitorWidth OR iYPos >= iMonitorHeight THEN
        WinPos(iXPos, iYPos);

When you need to resize a window, i.e.. calling WinSize(), it is quite likely that the window will not be resized, and simply cause the window to be sent to (-4,-4) of the primary monitor. To ensure your WinSize() resize the window on the spot, call the following function instead:

FUNCTION MM_WinSize(INT iXSize, iYSize)
INT iXPos, iYPos;

    // Remember exisiting position of the window 
iXPos = StrToInt(PageInfo(14));
iYPos = StrToInt(PageInfo(15));

    // Resize the window 
WinSize(iXSize, iYSize); // the 1st WinSize() may just send the window to 1st monitor 
WinSize(iXSize, iYSize); // the 2nd WinSize() ensure the window is resized properly 
WinPos(iXPos, iYPos); // reposition the window to original position