随笔分类 -  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... 阅读全文
posted @ 2013-11-29 16:22 NowhereMan 阅读(165) 评论(0) 推荐(0)
摘要:转自: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... 阅读全文
posted @ 2013-11-29 16:20 NowhereMan 阅读(150) 评论(0) 推荐(0)
摘要:add code in the dataGrid. private void dgvTestSteps_DataError(object sender, DataGridViewDataErrorEventArgs e) { e.ThrowException = false; e.Cancel = true; } 阅读全文
posted @ 2013-11-29 16:03 NowhereMan 阅读(601) 评论(0) 推荐(0)
摘要:首先设置要显示图片的列 DataGridViewImageColumn status = new DataGridViewImageColumn(); status.DisplayIndex = 0; status.HeaderText = "Status"; status.DataPropertyName = "IsPass"; status.ImageLayout = DataGridViewImageCellLayout.Zoom; dgvTestSteps.Columns.I... 阅读全文
posted @ 2013-10-21 14:20 NowhereMan 阅读(10870) 评论(1) 推荐(0)
摘要:转自: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 阅读全文
posted @ 2013-09-22 14:30 NowhereMan 阅读(239) 评论(0) 推荐(0)