private void cmdWrite_Click(object sender, EventArgs e)
        {
            Boolean vRet;
            int     vErrorCode = 0;

            lblMessage.Text = "Waiting...";
            Application.DoEvents();

            if (!bpc.EnableDevice(Program.gMachineNumber, 0)) // 0 : false
            {
                lblMessage.Text = util.gstrNoDevice;
                return;
            }

            if (!GetValue())
            {
                util.MessageBox(new IntPtr(0), "Invalid Value.", "Bell info", 1);
            }
            else
            {
                GCHandle gh = GCHandle.Alloc(dbBellInfoList, GCHandleType.Pinned);
                IntPtr   AddrOfmlngBellInfo = gh.AddrOfPinnedObject();
                int      nAddr = AddrOfmlngBellInfo.ToInt32();

                vRet = bpc.SetBellTime(Program.gMachineNumber, mBellCount, ref nAddr);
                gh.Free();

                if (vRet)
                {
                    ShowValue();
                    lblMessage.Text = "Success!";
                }
                else
                {
                    bpc.GetLastError(ref vErrorCode);
                    lblMessage.Text = util.ErrorPrint(vErrorCode);
                }
            }

            bpc.EnableDevice(Program.gMachineNumber, 1); // 1 : true
        }