Syntax
Object.SetServer ServerName or index as Variant
Description
SetServer is only useful if you are using the ClientIniPath property to specify multiple Loftware servers in the llmwclnt.ini file. After pointing the ClientIniPath property to a .ini file that contains references to multiple Loftware servers, you may use the SetServer method to tell the control which server to use. The Labels, Layouts, and Printers paths automatically inherit the values specified in the corresponding entry in the .ini file. If you need to disable a previous use of the ClientIniPath property, "SetServer 0” causes the default server to be selected. That uses the "LabelsPath","LayoutPath", "DropDirectory", and "PrinterPath" properties manually set with the control instead of the ones that are specified in the .ini file. Therefore, server numbers specified in the .ini file start at 1.
Example
'this example sets the
ClientIniPath property to a .ini file name. It then
'populates a list box
control with the server names and alias's found in
'the ini file. The
iteration is controlled with the ServerCount property, with
'the selected
server being controlled with the SetServer Method. Notice the
'default
server (0) is not included in the loop.
Dim i As Integer
On Error GoTo
Handler
frmFront.ClientX1.ClientIniPath =
Trim(txtClientIniLocation.Text)
For i = 1 To frmFront.ClientX1.ServerCount -
1
frmFront.ClientX1.SetServer (i)
lstServers.AddItem frmFront.ClientX1.ServerName & " ALIAS " &
frmFront.ClientX1.ServerAlias
Next i
See also: