Private Sub Command2_Click()
If Picture1.Picture <> LoadPicture("") Then
 Printer.Print Picture1.Picture
Else
 MsgBox ("不能打印")
End If
Printer.EndDoc
End Sub居然不能打印图片,请教怎么回事啊?

解决方案 »

  1.   

    Picture1.Picture <> LoadPicture("") ??
      

  2.   

    哈哈楼主牛啊 第一次见到这种写法的 Printer.PaintPicture Picture1.Image, (Printer.ScaleWidth - Picture1.Width) \ 2, 0, Picture1.Width, Picture1.Height  
    Printer.EndDoc 
      

  3.   

    怎样将picturebox上的内容(包括控件)保存为图片啊
      

  4.   

    Private Sub Command2_Click()
      If Picture1.Picture <> 0 Then
         Printer.Print Picture1.Picture,0,0
      Else
         MsgBox ("不能打印")
      End If
      Printer.EndDoc
      End Sub居然不能打印图片,请教怎么回事啊?[/Quote]
      

  5.   


    只能保存picture1上的图象啊,上面的控件不能保存啊
      

  6.   

    呵呵...天知道你代码怎么写的Picture1装载图片与text label image 随你 全部装进Picture1里面
    Option Explicit '强制宣告定义变量
    Private Declare Function PrintWindow Lib "user32" (ByVal Hwnd As Long, ByVal HDC As Long, ByVal nFlags As Long) As Long
    Private Sub Form_Load()
       '将窗体居中显示 (屏幕宽度减去窗体的宽度)除以2 , (屏幕高度减去窗体的高度)除以2
       Me.Move (Screen.Width - Me.Width) \ 2, (Screen.Height - Me.Height) \ 2
       Picture1.AutoRedraw = True
       Picture2.AutoRedraw = True
    End SubPrivate Sub Command1_Click() '将图片1 复制到 图片2
       PrintWindow Picture1.Hwnd, Picture2.HDC, 0
       SavePicture Picture2.Image, "c:\tt.bmp"
    End Sub