private void button1_Click(object sender, EventArgs e) { Win32Usb.UnregisterForUsbEvents(m_hUsbEventHandle); this.Hide(); Form2 f = new Form2(); f.ShowDialog(); m_hUsbEventHandle = Win32Usb.RegisterForUsbEvents(Handle, Win32Usb.HIDGuid); ReHIDUI(); this.Show(); }
private void toolStripButton5_Click(object sender, EventArgs e) { if (HIDDevice.TheHIDDevice == null) { MessageBox.Show("请连接设备"); return; } Win32Usb.UnregisterForUsbEvents(m_hUsbEventHandle); BE_ToolForm f = new BE_ToolForm(); f.ShowDialog(); Form2_Load(null, null); }
private void Form4_FormClosing(object sender, FormClosingEventArgs e) { Win32Usb.UnregisterForUsbEvents(m_hUsbEventHandle); }