Applies To:
  • CitectSCADA 5.xx, 5.42, 5.50
  • CitectHMI 5.xx, 5.42, 5.50

Summary:
I am using the Cicode Function FormOpenFile as per the Help Documentation, however I do not understand how to change the default path it is opening up the Dialog Box to. 

Solution:
Having a look at what is written in the Help we see the formating for the function as:

FormOpenFile(sTitle, sFileName, sFilter)

So if we wanted to bring up a dialog box that was to let us view all the executable files, then we would pass the following information in to the cicode.

sFilename = FormOpenFile("Open", "*.EXE", Exe Files (*.EXE)|*.EXE);

If we wanted to view the EXE files from a particular location, such as C:\Windows\System32 folder then we would pass the following information in to the cicode instead.

sFilename = FormOpenFile("Open", "C:\Windows\System32\*.EXE", Exe Files (*.EXE)|*.EXE);

By doing that, we have defined the location of the default folder for the dialog box.

 

Keywords:
 

Attachments