ClearLCD

VARIANT_BOOL ClearLCD(void)

Definition

Usage

Clear all displays on the LCD of the device.

Parameter

Return Value

Return True if it is successful, or return False.

Related Function

WriteLCD

 

Ejemplo

C#

private static int writeLCD(string ipAddr, int port, int rowNum, int colNum, string txt)
        {
int idwErrorCode = 0;
//Create Standalone SDK class dynamicly.
            zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass();
if (axCZKEM1.Connect_Net(ipAddr, 4370))
            {
int iMachineNumber = 1;
                axCZKEM1.ClearLCD();
if (axCZKEM1.WriteLCD(rowNum, colNum, txt))
                {
                    axCZKEM1.RefreshData(iMachineNumber);//the data in the device should be refreshed
                    MessageBox.Show("WriteLCD! ", "Success");
                }
else
                {
                    axCZKEM1.GetLastError(ref idwErrorCode);
                    MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error");
                }
            }
else
            {
                axCZKEM1.GetLastError(ref idwErrorCode);
            }
            axCZKEM1.Disconnect();
return idwErrorCode;
        }

VB

Private Sub writeLCD(ipAddr As String, port As Int32, rowNum As Int32, colNum As Int32, txt As String)
'Create Standalone SDK class dynamicly.
Dim axCZKEM1 As New zkemkeeper.CZKEM
Dim iMachineNumber As Integer
        iMachineNumber = 1
Dim idwErrorCode As Integer
If axCZKEM1.Connect_Net(ipAddr, port) = True Then
            axCZKEM1.ClearLCD()
If axCZKEM1.WriteLCD(rowNum, colNum, txt) = True Then
                axCZKEM1.RefreshData(iMachineNumber)
                MsgBox("WriteLCD! ", "Success") 'the data In the device should be refreshed
Else
                axCZKEM1.GetLastError(idwErrorCode)
                MsgBox("Operation failed,ErrorCode=" & idwErrorCode.ToString(), MsgBoxStyle.Exclamation, "Error")
End If
Else
            axCZKEM1.GetLastError(idwErrorCode)
End If
        axCZKEM1.Disconnect()
End Sub