如题
解决方案 »
- 如何实现用右键删除选定表格的一行的效果呢?谢谢
- 引发类型为“System.OutOfMemoryException”的异常。
- ImageMap控件中如何确定HotSpot?
- 循环问题~~
- Repeater绑定数据的问题,大侠来,分不高,求来帮帮忙吧
- ◆◇◆ 请问一下大家都用什么变量命名规范表示数组? ◆◇◆
- 请各位帮忙看看这是什么问题?
- 有在C#用过CreateThread的么?很急,搞定马上给分
- 如何打印水费册自动换行?
- Oracle有没有备份的文件损坏原来不起的情况?多吗? 这种情况,MS SERVER 2005出现的较多
- treeView的问题`` 求助`` 在线等``
- 调式程序出现以下错误:试图运行项目出错;无法在web服务器上启动调试。调试失败,因为没有启用集成windows身份验证,什么原因
应该只能一个一个控键打
这样做法,如果窗体上有上千个控件,对位置麻烦了,有简便的方法吗
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;namespace WindowsApplication3
{
public partial class Form1 : Form
{
private Image myFormImage;
public Form1()
{
InitializeComponent();
}
private void printForm()
{
myFormImage = new Bitmap(this.Width, this.Height); Graphics g = Graphics.FromImage(myFormImage);
g.CopyFromScreen(this.Location.X, this.Location.Y, 0, 0, this.Size);
}
private void button1_Click(object sender, EventArgs e)
{
printForm(); this.printPreviewDialog1.Document = this.printDocument1;
this.printPreviewDialog1.ShowDialog(this); } private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawImage(this.myFormImage, 0, 0);
}
private static void Main()
{
Application.Run(new Form1());
}
}
}
你这个方法是否能分页打印呢