Applies To:
  • CitectSCADA 5.xx, 6.XX
  • CitectHMI 5.xx, 6.XX

Summary:
I am using the FormSelectPrinter( ) cicode function, which in runtime allows the operator to select a printer to print to.

The issue comes about when the operator accidentally clicks any where outside the Printer Setup dialog. This causes the printer setup dialog to disappear behind the Citect window. Since the operators are restricted from minimising the Citect window or accessing the Windows desktop, this window just stays in the background.

The operators then tend to run the FormSelectPrinter( ) function again which pops up a new Printer Select Dialog.

Is there a way to prevent this from happening? As over time too many windows get opened up behind the Citect Mimic.
 

Solution:
This could be easily prevented using cicode functions which will check if there are any Printer Setup Dialogs open prior to opening any new ones. If the function finds a Printer Setup Dialog present, then it will simply make the window Active, or else it will open up a new one. A sample cicode to achieve this is shown below.


FUNCTION PrintWindow()
INT hWnd;

hWnd = WndFind("Print Setup"); // Checks for any open Print Setup Dialogs

IF hWnd <> 0 THEN
WndShow(hWnd,5); // Makes the Print Setup Dialog Active if found
ELSE
WinPrint(FormSelectPrinter(),0,0,1); // Opens new Print Setup Dialog
END
END 
 

Keywords:
FormSelectPrinter, Pop up Screens, Printer Setup Dialog  

Attachments