Example #1
0
        private void btnSplitWnd_Click(object sender, EventArgs e)
        {
            int ret = 0;

            int[] nWndRect = new int[4];
            m_nWidth    = Convert.ToInt32(m_edtWidth.Text);
            m_nHeight   = Convert.ToInt32(m_edtHeight.Text);
            nWndRect[0] = 0;
            nWndRect[1] = 0;
            nWndRect[2] = m_nWidth;
            nWndRect[3] = m_nHeight;

            if (1 == InitComm())
            {
                if (0 == m_nCommType)
                {
                    ret = CP5200.CP5200_RS232_SplitScreen(m_nCardID, m_nWidth, m_nHeight, 1, nWndRect);
                }
                else
                {
                    ret = CP5200.CP5200_Net_SplitScreen(m_nCardID, m_nWidth, m_nHeight, 1, nWndRect);
                }

                if (ret >= 0)
                {
                    MessageBox.Show("Successful");
                }
                else
                {
                    MessageBox.Show("Fail");
                }
            }
        }
Example #2
0
        private void btnSplitWnd_Click(object sender, System.EventArgs e)
        {
            int ret = 0;

            int[] nWndRect = new int[8];
            GetSplitWnd(nWndRect);
            InitComm();
            if (0 == m_nCommType)
            {
                ret = CP5200.CP5200_RS232_SplitScreen(Convert.ToByte(m_cmbCardID.SelectedIndex + 1), Convert.ToInt32(m_txtWidth.Text), Convert.ToInt32(m_txtHeight.Text), 2, nWndRect);
            }
            else
            {
                ret = CP5200.CP5200_Net_SplitScreen(Convert.ToByte(m_cmbCardID.SelectedIndex + 1), Convert.ToInt32(m_txtWidth.Text), Convert.ToInt32(m_txtHeight.Text), 2, nWndRect);
            }

            if (ret >= 0)
            {
                MessageBox.Show("Successful");
            }
            else
            {
                MessageBox.Show("Fail");
            }
        }