摘要: 1.新建Excel并保存数据2.追加Excel并自动分页保存数据View Code using System;using System.Collections.Generic;using System.Runtime.InteropServices;using Excel = Microsoft.Office.Interop.Excel;using System.Diagnostics;using System.IO;using System.Collections;using System.Data;namespace AssismentForm{ /// <summary> / 阅读全文
posted @ 2012-03-22 21:41 ghypnus 阅读(430) 评论(2) 推荐(1) 编辑
摘要: View Code using System;using System.Data.SqlClient;using System.Data;namespace Test{ class SQLHelper { //定义数据库连接实例 private static SqlConnection con = CreateCon(); //创建数据库连接静态方法 public static SqlConnection CreateCon() { return new SqlConnection("ser... 阅读全文
posted @ 2012-03-22 20:37 ghypnus 阅读(490) 评论(1) 推荐(0) 编辑
摘要: //1.设置父窗体(主窗体)的AutoScrollMinSize大于父窗体的Size //例如主窗体(400,400), AutoScrollMinSize(500,500) //2.设置主窗体的IsMdiContainer为true private void Form2_Load(object sender, EventArgs e) { //悬浮窗体 Form3 f3 = new Form3(); //制定悬浮Mid子窗体的父窗体是该主窗体 ... 阅读全文
posted @ 2012-03-22 10:44 ghypnus 阅读(657) 评论(0) 推荐(0) 编辑
摘要: bool enterkey; protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { enterkey = false; if (keyData == Keys.Tab) { return true; } return base.ProcessCmdKey(ref msg, keyData); } 阅读全文
posted @ 2012-03-22 09:17 ghypnus 阅读(340) 评论(0) 推荐(0) 编辑