Facebook Sharer
选择您要替换的背景颜色:
【农历新年】背景图片:
个性化设定
 注册  找回密码
查看: 1830|回复: 2
打印 上一主题 下一主题

我的code里面,那端可以排版??就是改每条columns的大小,位置。。

[复制链接]

17

主题

0

好友

316

积分

超级会员

Rank: 5Rank: 5Rank: 5Rank: 5Rank: 5

跳转到指定楼层
1#
发表于 2010-6-10 08:03 PM |只看该作者 |倒序浏览
PrintDialog MyPrintDialog = new PrintDialog();
            MyPrintDialog.AllowCurrentPage = false;
            MyPrintDialog.AllowPrintToFile = false;
            MyPrintDialog.AllowSelection = false;
            MyPrintDialog.AllowSomePages = false;
            MyPrintDialog.ShowHelp = false;
            MyPrintDialog.ShowNetwork = false;

            if (MyPrintDialog.ShowDialog() != DialogResult.OK)
                return false;

            printDocument1.DocumentName = "Client Reprots";
            printDocument1.PrinterSettings = MyPrintDialog.PrinterSettings;
            printDocument1.DefaultPageSettings = MyPrintDialog.PrinterSettings.DefaultPageSettings;
            printDocument1.DefaultPageSettings.Margins = new Margins(40, 40, 40, 40);

            if (MessageBox.Show("Do you want the report to be centered on the page", "InvoiceManager - Center on Page", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                MyDataGridViewPrinter = new DataGridViewPrinter(dataGridView1, printDocument1, true, true, "Client", new Font("Tahoma", 18, FontStyle.Bold, GraphicsUnit.Point), Color.Black, true);
            }
            else
            {
                MyDataGridViewPrinter = new DataGridViewPrinter(dataGridView1, printDocument1, false, true, "Client", new Font("Tahoma", 18, FontStyle.Bold, GraphicsUnit.Point), Color.Black, true);
            }
            return true;




收藏收藏0

5

主题

0

好友

318

积分

超级会员

Rank: 5Rank: 5Rank: 5Rank: 5Rank: 5

2#
发表于 2010-6-10 08:43 PM |只看该作者
PrintDialog MyPrintDialog = new PrintDialog();
            MyPrintDialog.AllowCurrentPage = false;
...
kenji0523 发表于 2010-6-10 08:03 PM



MyDataGridViewPrinter = new DataGridViewPrinter(dataGridView1, printDocument1, true, true, "Client", new Font("Tahoma", 18, FontStyle.Bold, GraphicsUnit.Point), Color.Black, true);

modify gridview1.你去study gridview的structure。


回复

使用道具 举报

17

主题

0

好友

316

积分

超级会员

Rank: 5Rank: 5Rank: 5Rank: 5Rank: 5

3#
发表于 2010-6-10 09:28 PM |只看该作者
ok!!谢谢!!


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

JBTALKS.CC |联系我们 |隐私政策 |Share

GMT+8, 2024-10-25 08:32 PM , Processed in 0.129407 second(s), 27 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

Ultra High-performance Dedicated Server powered by iCore Technology Sdn. Bhd.
Domain Registration | Web Hosting | Email Hosting | Forum Hosting | ECShop Hosting | Dedicated Server | Colocation Services
本论坛言论纯属发表者个人意见,与本论坛立场无关
Copyright © 2003-2012 JBTALKS.CC All Rights Reserved
合作联盟网站:
JBTALKS 马来西亚中文论坛 | JBTALKS我的空间 | ICORE TECHNOLOGY SDN. BHD.
回顶部