void DeviceSettingsButtonClick(object sender, EventArgs e) { DeviceItem deviceItem = (DeviceItem)deviceComboBox.Items[deviceComboBox.SelectedIndex]; PortAudio.PaAsio_ShowControlPanel(deviceItem.DeviceIndex, new IntPtr(this.Handle.ToInt64())); }