WinForm
文章平均质量分 70
绿色背影
坚持坚毅坚信
展开
-
C# WinForm 学习笔记之一
第一本书《WindowsForm程序设计》第一章:1.Application类Application类用来管理应用程序、线程和Windows消息。System.Windows.Forms.Application.Run(newMyForm());Run方法在当前线程下开始一个消息循环,并等待操作系统消息。Application类是一个对象,它将代表程序来管理和运行窗体、线程原创 2013-08-06 17:05:46 · 753 阅读 · 0 评论 -
C# WinForm学习笔记之二
第二章:1. Windows Forms DesignerForm中的Windows Forms Designer用来保证运行期间所有的窗体组件被正确的管理,特别是那些不属于Windows Form的控件。private System.ComponentModel.IContainercomponents =null;在Form的InitializeComponent()方法中原创 2013-08-07 14:54:18 · 583 阅读 · 0 评论 -
根据DataGridView中单元格内容设置其ForeColor
近期在做visio的二次开发,涉及到DataGridview与visio的交互,在DataGridview中一列记录天气类型:雨、雾、雪等,需要将这些天气类型的颜色设置为指定的颜色。下面代码可以对某个单元格的前景色进行设置,DataGridview.Rows[i].Cells[j].Style.ForeColor = System.Drawing.Color.White尝试多次后,发现原创 2013-08-28 12:49:10 · 1205 阅读 · 0 评论 -
Visio二次开发——鼠标置于Shape上显示细节信息
当鼠标置于Visio图的Shape上时,需要将当前DetailInfo显示出来。以下程序实现当鼠标置于Shape上时间超过2s时,弹出DetailInfo的窗口。1.在鼠标的MouseMove事件响应函数中添加Shape moveShape = null;Shape lastShape = null;ShapeItem item = new ShapeItem();priv原创 2013-09-02 18:26:35 · 2327 阅读 · 1 评论 -
DevExpress控件ChartControl简单案例
由于工作需要,最近学习了DevExpress控件中的ChartControl,并做了简单尝试,通过程序动态添加数据源到chartControl控件中,绘制了如下的条形图。条形图的颜色等外观可在chartControl控件的RunWizard中编辑,也可以在RunWizard中添加静态的Series,并对条形图的各种属性进行设置。using System;using System.Col原创 2013-09-25 15:19:59 · 2853 阅读 · 0 评论 -
DevExpress treeList与GridControl交互
近日用到了好几个Dev的控件,现总结一下treeList的使用,另外包含一点和GridControl的交互。using System;using System.Collections.Generic;using System.ComponentModel;using System.Drawing;using System.Data;using System.Text;u原创 2013-09-27 15:30:36 · 1960 阅读 · 0 评论