本身我自己写了一个代码来改打印方向的 
还有一个按钮是弹出打印设置那个对话框的(就是Windows本身的打印设置)在fpSpreadPreview控件实现打印预览时, 使用自己写的代码可是随意改变打印方向
可是 每当使用弹出打印设置按钮 用Windows 本身自代的打印方向  选择 横向时   我再用我自己写的那个改变打印方向铵钮就不好用了 (就是改变不了打印方向了)
麻烦高人 指点下  谢谢

解决方案 »

  1.   

    据说打到SP5以上就可以直接设置打印方向
    你的代码用的什么大家不知道
    fpSpreadPreview估计用的人也不是很多
    所以这个问题..
      

  2.   

    Private Sub CmdOK_Click()
        CmdOK.SetFocus
        
        GetZoom Combo1.ListIndex + 1
        ZoomIndex = Combo1.ListIndex + 1
        
        'Change the page orientation
        'Portrait
        If porientation(0).Value = True Then
            SS.PrintOrientation = PrintOrientationPortrait
        'Landscape
        Else
            SS.PrintOrientation = PrintOrientationLandscape
        End If
        'Update margins
        
        SS.PrintMarginTop = CDbl(pageMargin(2).Text) * 56.7
        SS.PrintMarginBottom = CDbl(pageMargin(3).Text) * 56.7
        SS.PrintMarginLeft = CDbl(pageMargin(0).Text) * 56.7
        SS.PrintMarginRight = CDbl(pageMargin(1).Text) * 56.7
        frmRptPrvw.txtLeft.Text = CDbl(pageMargin(0).Text)
        frmRptPrvw.txtTop.Text = CDbl(pageMargin(2).Text)
        frmRptPrvw.SprdPrvw.hWndSpread = SS.hwnd
        
        UnLoad Me
        
    End Sub这是我自己写的打印方向的代码    
    还一个按钮是直接弹出打印设置对话框的(就是WINDOWS)
      

  3.   

    ss就是你说的fpSpreadPreview控件吧?
    还是别的?
      

  4.   

    SS是fpSpread控件 中存的是个表  
    SprdPrvw是fpSpreadPreview控件