上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 23 下一页
摘要: 本文章來源:http://news.cnblogs.com/group/topic/44870/ 功能:在代码中动态修改Label的值 步骤: 新建一个窗口Form1,添加一个标签label1和两个按钮btn_one,btn_two 然后添加btn_one和btn_two的Click事件,代码如下,都能动态修改label1的值 //第一种方法实现 private void btn_one_Click(object sender, EventArgs e) { Thread th = new Thread((ThreadStart)delegate() { test(); }); th.Star 阅读全文
posted @ 2011-07-29 11:33 Yaoquan.Luo 阅读(3706) 评论(0) 推荐(0)
摘要: 來源: http://hi.baidu.com/%CD%F5%D5%DF%CA%D3%BD%E7%CA%FD%BE%DD%D6%D0%D0%C4/blog/item/324bcddbac4f20e239012f90.html今天在做Winform登陆框时想到了一个问题,每次做需要登录的软件时都必须在 窗体的Closed事件中判断是否已经成功登陆,以防止非法用户通过关闭登陆框而进入软件系统,的确是挺麻烦的,要是能把窗体的关闭按钮给屏蔽了 那就能更省事了不是?呵呵 ,在网上找了找还真找到了 ,与大家分享啊~~~ 添加引用 using System.Runtime.InteropServices;. 阅读全文
posted @ 2011-07-28 17:12 Yaoquan.Luo 阅读(650) 评论(0) 推荐(0)
摘要: How to scroll in the grid when editing data in a cellfrom:http://www.devexpress.com/Support/Center/p/CQ5675.aspxHi,I would like to know how can I allow to scroll the grid when I'm editing a cell. Currently the scroll doesn't workThanksChristophe<- Reviewed by DevExpress Team 2006/12/19 6: 阅读全文
posted @ 2011-07-25 11:43 Yaoquan.Luo 阅读(502) 评论(0) 推荐(0)
摘要: 一 ngen /gac将assembly放到gac中,并用ngen 预先编译, 应用程序装入会成n倍的提升虽然ngen 有一大堆缺点,但windows forms应用,启动速度很重要,在实践中,我建议如下使用ngen1. 只对不常变的 assembly进行ngen ,通常,这都是第三方的dll ,比方说第三方的ui控件,像devexpress或是janus的组件2. 明确assembly之间的依赖, 这有助于你简短正确的写出ngen install 命令比方说 devexpress.xtragrid依赖devexpress.xtraeditors,devexpres.data,devexpr. 阅读全文
posted @ 2011-07-23 10:53 Yaoquan.Luo 阅读(263) 评论(0) 推荐(0)
摘要: Why does my code take longer to execute the first time it's run? Article Detailsfrom: http://www.devexpress.com/Support/Center/p/A2670.aspx ID: A2670 Version(s): Updated: 2011/6/3 Product Group: .NET (WinForms) Product: n/a Description: The first time I run my application which contains the Xtra 阅读全文
posted @ 2011-07-22 18:31 Yaoquan.Luo 阅读(251) 评论(0) 推荐(0)
摘要: from:http://www1.devexpress.com/Support/Center/p/DB26046.aspxThis code works only when called from within InitializeComponent() method. If it is invoked later it won't add anything visually (skinItm is BarSubItem placed on an XtraBar).BarButtonItem tubo = new DevExpress.XtraBars.BarButtonItem(); 阅读全文
posted @ 2011-07-20 15:14 Yaoquan.Luo 阅读(941) 评论(0) 推荐(0)
摘要: DefaultValue的作用:不是提供设计时的默认值,是当泥输入的值与你设置的值相同时,这个值不变黑【加粗显示】。 阅读全文
posted @ 2011-07-20 10:30 Yaoquan.Luo 阅读(709) 评论(0) 推荐(0)
摘要: 在分割字符串的时候我们常常会用到Split,下面我们就来学习一下分割字符串的技巧和方法。 1、使用String.Split单字符分割 String.Split方法 命名空间:System程序集:mscorlib(在 mscorlib.dll 中) 返回的字符串数组包含此实例中的子字符串(由指定字符串或 Unicode 字符数组的元素分隔)。 Split(Char[]) 返回的字符串数组包含此实例中的子字符串(由指定 Unicode 字符数组的元素分隔)。 Split(Char[], Int32) 返回的字符串数组包含此实例中的子字符串(由指定 Unicode 字符数组的元素分隔)。参数指定返回 阅读全文
posted @ 2011-07-19 17:41 Yaoquan.Luo 阅读(381) 评论(0) 推荐(0)
摘要: from:http://community.devexpress.com/forums/t/3909.aspx Hi forum,I hardly try creating a menu during runtime.Via reflection I get some info out of one assembly and based on this info I would like to build a menu.In my helper class where I reflect the specific assembly I create a new subitem with som 阅读全文
posted @ 2011-07-19 17:29 Yaoquan.Luo 阅读(401) 评论(0) 推荐(0)
摘要: 1,增加新行用InitNewRow事件,给新行某字段赋值。后结束编辑。private void grdView_InitNewRow(object sender, DevExpress.XtraGrid.Views.Grid.InitNewRowEventArgs e) { DevExpress.XtraGrid.Views.Grid.GridView view = sender as DevExpress.XtraGrid.Views.Grid.GridView; view.SetRowCellValue(e.RowHandle, view.Columns["EnterID&quo 阅读全文
posted @ 2011-07-19 17:27 Yaoquan.Luo 阅读(1259) 评论(1) 推荐(1)
摘要: from:http://www.devexpress.com/Support/Center/p/Q205500.aspxI insert into my verticalGrid by programation a repositoryItemButtonEdit (as a row) that has of course a buttonEdit and a value, when the user click on the buttonEdit it make a fileDLG appears, I want to give back the path to the repository 阅读全文
posted @ 2011-07-18 17:46 Yaoquan.Luo 阅读(1484) 评论(0) 推荐(0)
摘要: 绑定数据源: lookupedit.properties.valuemember = 实际要用的字段; //相当于editvalue lookupedit.properties.displaymember =要显示的字段; //相当于text lookupedit.properties.datasource = 数据源;判断是否选择下拉框: if(this.lookupedit.editvalue==null ||this.lookupedit.editvalue.tostring()=="nulltext") { //提示信息,说明未选择下拉框 } 清空nulltext值 阅读全文
posted @ 2011-07-16 10:09 Yaoquan.Luo 阅读(472) 评论(0) 推荐(0)
摘要: DataTable dtDepartmanGetir = new DataTable();dtDepartmanGetir = db.getSQL(sqlDepartmanGetir);repDepartman.DataSource = dtDepartmanGetir;repDepartman.DisplayMember = "Departman"; repDepartman.ValueMember = "intDepartman";// Bu satırları ekle repDepartman.Properties.PopulateColumns 阅读全文
posted @ 2011-07-16 10:08 Yaoquan.Luo 阅读(249) 评论(0) 推荐(0)
摘要: private void dgvInfo_Paint(object sender, PaintEventArgs e) { e.Graphics.DrawRectangle(Pens.SteelBlue, new Rectangle(0, 0, this.dgvInfo.Width - 1, this.dgvInfo.Height - 1)); } 阅读全文
posted @ 2011-07-14 10:09 Yaoquan.Luo 阅读(341) 评论(0) 推荐(0)
摘要: 來源:http://www.pcreview.co.uk/forums/user-control-instance-datagridview-columns-visual-studio-design-t2893613.htmlHi Sorin, Thank you for your feedback. I am trying to implement a custom collection editor for the inner DataGridView columns within a UserControl. The custom collection editor is derived 阅读全文
posted @ 2011-07-13 16:40 Yaoquan.Luo 阅读(526) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 23 下一页