随笔分类 - WinForm
摘要:[DllImport("user32.dll")] public static extern bool ReleaseCapture();[DllImport("user32.dll")] public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); private void Form_MouseDown(object sender, MouseEventArgs e) { ReleaseCapture(); SendMess...
阅读全文
摘要:转自:http://blog.csdn.net/ranbolwb/article/details/7277983 Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); config.AppSettings.Settings["host"].Value = txtHost.Text; config.AppSettings.Settings["port"].Value = nudPort.Value...
阅读全文
摘要:add code in the dataGrid. private void dgvTestSteps_DataError(object sender, DataGridViewDataErrorEventArgs e) { e.ThrowException = false; e.Cancel = true; }
阅读全文
摘要:首先设置要显示图片的列 DataGridViewImageColumn status = new DataGridViewImageColumn(); status.DisplayIndex = 0; status.HeaderText = "Status"; status.DataPropertyName = "IsPass"; status.ImageLayout = DataGridViewImageCellLayout.Zoom; dgvTestSteps.Columns.I...
阅读全文
摘要:转自:http://heisetoufa.iteye.com/blog/382684第一种方法:用委托,Form2和Form3是同一组Form2C#代码usingSystem; usingSystem.Collections.Generic; usingSystem.ComponentModel; usingSystem.Data; usingSystem.Drawing; usingSystem.Text; usingSystem.Windows.Forms; namespaceTestMouseMove { publicdelegatevoidSetVisiableHandler(); p
阅读全文
浙公网安备 33010602011771号