如题啊!

解决方案 »

  1.   

    Dim CN   As New ADODB.Connection                '定义数据库的连接存放数据和代码
        Dim Rs   As New ADODB.Recordset
        CN.ConnectionString = "Provider=sqloledb;Data Source=pmserver;Initial Catalog=northwind;User Id=sa;Password=sa;"
        CN.Open
        Rs.CursorLocation = adUseClient
        Rs.Open "select * from employees", CN, adOpenDynamic, adLockBatchOptimistic   Set DataGrid1.DataSource = Rs
       Picture1.Width = DataGrid1.Width
       Picture1.Height = DataGrid1.Height
       Picture1.Picture = DataGrid1.CaptureImage    If MsgBox("你是否要打印?" & vbCrLf & "如果打印,请等待打印作业.....", 4 + 32 + 256, "打印") = vbYes Then
            Printer.ScaleMode = vbCentimeters
            Printer.PaintPicture Picture1.Picture, 2, 2
            Printer.EndDoc
        End If
      

  2.   

    参考:
    http://www.dapha.net/down/show.asp?classid=1&Nclassid=140