呵呵,我正要看这方面的例子,谢谢!
[email protected]

解决方案 »

  1.   

    TO: blue_gao(小高) :打印我建立了一个类,明天我会把那部分贴出来,如果你急的话,建议你看   ...\Microsoft Visual Studio .NET\FrameworkSDK\Samples\QuickStart\winforms\samples\printing\example5.我的类就是改编自这个类,只是加了处理图片的语句.想向其它要代码的人说sorry,因为我用的控件是公司买的,所以如果要用的话,就必须要安装NI公司的那些控件,所以大家大概不会看到程序执行后的效果,但是代码是完全可用的,为了弥补我的错误,我会在程序中写大量的注释.明天早上回公司我就发,再次抱歉.......
      

  2.   

    给我发一份好吧,我初学,谢谢
     [email protected]
      

  3.   

    [email protected]
    我想要哦,给我一份吧。
      

  4.   

    上面的我已经发出了,但好象有个被退回了,请没收到的说一下sorry
      

  5.   

    TO: blue_gao(小高):你要的打印代码打印按钮: //下面的image是Image类对象,保存你想打印的图
    MyPrintDocument mydc=new MyPrintDocument(image);
    if(pageset!=null)
       mydc.DefaultPageSettings=pageset;
    PrintDialog dlg=new PrintDialog();
    dlg.Document=mydc;
    DialogResult res=dlg.ShowDialog();
    if(res==DialogResult.OK)
       mydc.Print();打印预览:
    PrepareImage();
    MyPrintDocument mydc=new MyPrintDocument(image);
    if(pageset!=null)
       mydc.DefaultPageSettings=pageset;
    PrintPreviewDialog dlg = new PrintPreviewDialog();
    dlg.Document=mydc;
    dlg.ShowDialog();定义的打印类: //可能有些代码多余
    public class MyPrintDocument : System.Drawing.Printing.PrintDocument
    {
      private Image image;
      private System.ComponentModel.Container components;
      public MyPrintDocument(Image image)
      {
         this.image = image;
      }
      protected override void OnBeginPrint(PrintEventArgs ev)
      {
         base.OnBeginPrint(ev);
      }
      protected override void OnPrintPage(PrintPageEventArgs ev)
      {
         base.OnPrintPage(ev);
         ev.Graphics.DrawImage(this.image,0,0);//,296,272);
      }
    }
      

  6.   

    jzyhummel(风之克利斯): 给我一份![email protected]谢谢!!
      

  7.   

    [email protected] 
    thinking of you
      

  8.   

    请给我一份,我正需要这个,谢谢先!
    [email protected]
      

  9.   

    我非常想研究一下!!请给我一分
    [email protected]
    感谢,感谢!!感谢!!!
      

  10.   

    谢谢!我也非常想要一份!:)    [email protected]
      

  11.   

    希望你能给我一份!
    但愿我要的不是太晚!:)
    [email protected]
      

  12.   

    老兄,别忘了我哦![email protected]
      

  13.   

    [email protected]
    thanx
      

  14.   

    我初学,但因一直是我很头疼的(以前学VC VB)真是太感谢你了,让我分享一下C#的优点;
    [email protected]
      

  15.   

    我也想要一份
    并且我有一个建议:如果你能够在以后的写代码的过程中加上错误处理的代码会更好的。
    我的电子邮件:[email protected]
    谢谢!
      

  16.   

    谢谢你的建议,我也是初学C#的,以前是用C++的,首先,用C#的话可以在很大程度上不用考虑内寸泄露,并且在C#中指针被限制使用(不是说不能用),所以,相对来说,我觉得错误处理有时不是太必要.
      

  17.   

    我想研究一下你的成果,多谢
    [email protected]
      

  18.   

    我想研究一下你的成果,多谢
    [email protected]
      

  19.   

    [email protected]
    [email protected]
      

  20.   

    请发给我!!我谢!
    [email protected]
      

  21.   

    请发给我!!我谢!
    [email protected]
    谢谢
      

  22.   

    我也想要一个,谢谢了
    [email protected]
      

  23.   

    我也想要一个,多谢
    [email protected]