悟生慧

 

随笔分类 -  WinForm

上一页 1 2 3 4 5 下一页

Winform 打印报表
摘要:Winform 打印报表(从网上看到的代码,感觉不错,上传以做备忘)winform 打印原理..1.先在画布上面画好表格2.然后传入要打印的数据代码如下:using System;using System.Collections.Generic;using System.Text;using System.Windows.Forms;using System.Drawing.Printing;using System.Drawing;namespace Etaocn.Util{ public class Printer { private DataGridView dataview; pri. 阅读全文

posted @ 2011-11-29 15:39 悟生慧 阅读(4425) 评论(1) 推荐(0) 编辑

合并GridView中某列相同信息的行(单元格)
摘要:/// <summary> /// 合并GridView中某列相同信息的行(单元格) /// </summary> /// <param name="GridView1">GridView</param> /// <param name="cellNum">第几列</param> public static void GroupRows(GridView GridView1, int [] cellNum)//已经改动过了现在是对指定多列后把相同信息合并 { //int []arr 阅读全文

posted @ 2011-11-29 11:00 悟生慧 阅读(371) 评论(0) 推荐(0) 编辑

电子表格(SpreadSheet)主要属性、方法和事件 原文:http://blog.csdn.net/zhangting1987/article/details/2065871
摘要:http://ufo-crackerx.blog.163.com/ 全球最大编程控件补丁仓库http://www.spreadsheetgear.com/support/samples/excel.aspx资源网站http://www.cnblogs.com/springSky/archive/2011/07/15/2107108.html博客园关于Devexpress 的xtraReports学习可制作复杂表头Spreadsheet.XMLData 字符串类型的属性,可用来获得或设置XML格式的电子表格内容。Spreadsheet.Range 该方法接受一个区域引用(例如A1:B2或A:B) 阅读全文

posted @ 2011-11-14 15:16 悟生慧 阅读(3066) 评论(0) 推荐(1) 编辑

C#之winfrom打印图片
摘要:第一步:拖一个printDocument控件到界面。打印按钮的代码:C# CODE:privatevoid button1_Click(object sender, EventArgs e)//执行打印 { PrintDialog MyPrintDg =new PrintDialog(); MyPrintDg.Document = printDocument1; if (MyPrintDg.ShowDialog() == DialogResult.OK) { try { printDocument1.Print(); } catch { //停止打印 printDocument1.PrintC 阅读全文

posted @ 2011-11-09 16:30 悟生慧 阅读(15254) 评论(0) 推荐(1) 编辑

如何在zedgraph中设置X坐标轴显示格式为日期时间型?转自:http://topic.csdn.net/u/20110508/14/0eb351c2-cacb-4ad2-b83b-f2ceb374f699.html
摘要:zedgraph相关链接:http://download.csdn.net/tag/zedgraphhttp://download.csdn.net/detail/wuyazhe/2591699http://download.csdn.net/detail/wuyazhe/2588529教程相关链接http://wenku.baidu.com/view/ffcf461dc281e53a5802ff9a.html源码下载:1.http://download.csdn.net/download/liu5623/18649332.http://download.csdn.net/download/s 阅读全文

posted @ 2011-11-08 15:08 悟生慧 阅读(2864) 评论(0) 推荐(0) 编辑

C#水晶报表的分页统计字段
摘要:一、在报表里定义三个公式字段如:qty_head、qty_dtl、qty_foot二、给三个字段分别加上代码1. qty_head代码whileprintingrecords;numbervar qty:=0; //数字currencyVar qty:=0; //金额2. qty_dtl代码whileprintingrecords;numbervar qty; //数字currencyVar qty; //金额qty := qty + {tbOrderOut_Dtl_View.qty};3. qty_foot代码whileprintingrecords;numbervar qty; //数字c 阅读全文

posted @ 2011-09-27 15:09 悟生慧 阅读(885) 评论(0) 推荐(0) 编辑

TreeView控件如何设置节点显示与隐藏,主要是用来做后台权限,没有权限的就隐藏,有权限的就显示?
摘要:原文来自:http://wenwen.soso.com/z/q104168454.htmusing System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;/// <summary>/// TreeMa 阅读全文

posted @ 2011-09-19 17:30 悟生慧 阅读(3126) 评论(0) 推荐(0) 编辑

C#编写的winform程序打包方法
摘要:C#编写的winform程序打包方法1.在解决方案资源管理器 点击“解决方案” 添加 “新建项目” 选择-->其它项目类型-->安装和部署-->安装项目可修改名称、路径,默认不修改也可以2.右击 刚刚添加的“安装项目” 点击“添加”-->“项目输出” 直接点击 “确定”.3.右击 “安装项目” -->“视图” -->“文件系统”会看到有三个分类文件夹:1.应用程序文件夹 2.用户的“程序”菜单 3.用户桌面点击 应用程序文件夹 -->选中“主输出来自[解决方案即项目]”;复制并粘贴到“用户桌面文件”下 即是 桌面快捷方式。在用户的“程序”菜单下也粘贴个 阅读全文

posted @ 2011-09-16 11:35 悟生慧 阅读(805) 评论(0) 推荐(0) 编辑

C#委托学习 原文推荐:http://www.cnblogs.com/warensoft/archive/2010/03/19/1689806.html?login=1#commentform
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.IO;using System.Data.SqlClient;namespace WindowsFormsApplication1{ /** * 两个RadioButton,分别用来让用户选择求最大值以及求最小值 rbtM 阅读全文

posted @ 2011-08-22 13:56 悟生慧 阅读(288) 评论(0) 推荐(0) 编辑

C# winfrom设置循环暂停和继续 原文转自:http://blog.csdn.net/qwldcl/article/details/3970784
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace WindowsFormsApplication1{ public partial class Form12 : Form { public enum RunState { running, pause, stop } priva 阅读全文

posted @ 2011-08-10 11:31 悟生慧 阅读(1330) 评论(0) 推荐(0) 编辑

winfrom的DataGridView控件选中行的DataGridViewLinkColumn列字体颜色的改变
摘要:/// <summary> /// 当前所选内容更改时发生 /// </summary> /// <param name="sender"></param> /// <param name="e"></param>private void dgvUserList_SelectionChanged(object sender, EventArgs e) { for (int i = 0; i < dgvUserList.RowCount; i++) { DataGridViewL 阅读全文

posted @ 2011-07-28 10:39 悟生慧 阅读(1714) 评论(0) 推荐(0) 编辑

winform的DataGridView列标题单元格样式设置
摘要:dgvHistory.EnableHeadersVisualStyles = false;//列标题是否使用用户当前主题的可观样式 DataGridViewColumnHeaderCell dgvc=dgvHistory.Columns[10].HeaderCell;//获取表示列标题 dgvc.Style.ForeColor = Color.Red;//设置单元格样式 阅读全文

posted @ 2011-07-20 17:00 悟生慧 阅读(3437) 评论(0) 推荐(0) 编辑

winform的DataGridView合并单元格
摘要:private void dataGridView1_CellPainting(object sender, DataGridViewCellPaintingEventArgs e) { Brush gridBrush = new SolidBrush(this.dataGridView1.GridColor); SolidBrush backBrush = new SolidBrush(e.CellStyle.BackColor); SolidBrush fontBrush = new SolidBrush(e.CellStyle.ForeColor); int cellheight; i. 阅读全文

posted @ 2011-07-20 15:27 悟生慧 阅读(5426) 评论(1) 推荐(1) 编辑

DataGridViewCell 类
摘要://SetstheToolTiptextforcellsintheRatingcolumn.voiddataGridView1_CellFormatting(objectsender,DataGridViewCellFormattingEventArgse){if((e.ColumnIndex==this.dataGridView1.Columns["Rating"].Index)&&e.Value!=null){DataGridViewCellcell=this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIn 阅读全文

posted @ 2011-07-12 11:08 悟生慧 阅读(395) 评论(0) 推荐(0) 编辑

动态修改DataTable中某列的值并绑定到DataGridView
摘要:DataTable dt = igmbll.getAllVWShopGoodsPurMas(); foreach (DataRow Row in dt.Rows) { Row[4] = Convert.ToDecimal(Row[4].ToString()); dgvVWShopGoodPurMas.Rows.Add(Row.ItemArray);// } this.dgvVWShopGoodPurMas.DataSource = dt; 阅读全文

posted @ 2011-06-24 15:20 悟生慧 阅读(2071) 评论(0) 推荐(0) 编辑

C#使用递归算法给TreeView控件绑定数据
摘要:/// <summary> /// 查找根节点(parent_ID为0的节点)的子节点 /// </summary> /// <param name="parent_ID">参数,接收根节点ID即0</param> public void bindtree(string parent_ID) { this.tvgood.Nodes.Clear(); DataTable dt = frmgb.Getdata(parent_ID); if (dt.Rows.Count > 0) { for (int i = 0; i < 阅读全文

posted @ 2011-06-23 11:07 悟生慧 阅读(1556) 评论(0) 推荐(0) 编辑

winfrom中的弹出询问消息框提示
摘要:if (dgvgood.Rows.Count > 0) { switch (MessageBox.Show("单据已经修改,要保存吗?", "询问", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)) { case DialogResult.Cancel: break; case DialogResult.Yes: { //if (string.IsNullOrEmpty(cbperson.Text)) //{ // M 阅读全文

posted @ 2011-06-23 10:50 悟生慧 阅读(2773) 评论(0) 推荐(0) 编辑

ArrayList转换类型为DataTable类型
摘要:/// <summary> /// ArrayList转换类型为DataTable /// </summary> /// <param name="list"></param> /// <returns></returns> public static DataTable ToDataTableTow(IList list) { DataTable result = new DataTable(); if (list.Count > 0) { PropertyInfo[] propertys = 阅读全文

posted @ 2011-06-21 15:56 悟生慧 阅读(2373) 评论(0) 推荐(1) 编辑

c#的委托和事件
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace GoldCubePos.App{ public partial class Form1 : Form { private delegate void ShowName(object sender);//定义委托 private 阅读全文

posted @ 2011-06-08 17:34 悟生慧 阅读(160) 评论(0) 推荐(0) 编辑

C# 的 Delegate 学习
摘要:C# 的 Delegate TypeDelegate 是一种函数指针,但与普通的函数指针相比,区别主要有三:1) 一个 delegate object 一次可以搭载多个方法(methods)[译注1],而不是一次一个。当我们唤起一个搭载了多个方法(methods)的 delegate,所有方法以其“被搭载到 delegate object 的顺序”被依次唤起——稍候我们就来看看如何这样做。2) 一个 delegate object 所搭载的方法(methods)并不需要属于同一个类别。一个 delegate object 所搭载的所有方法(methods)必须具有相同的原型和形式。然而,这些方 阅读全文

posted @ 2011-06-08 17:07 悟生慧 阅读(247) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 下一页

导航