Foxtable(狐表)用户栏目专家坐堂 → 专业打印能不能把这个正在打印隐藏掉?


  共有1911人关注过本帖树形打印复制链接

主题:专业打印能不能把这个正在打印隐藏掉?

帅哥,在线噢!
有点蓝
  11楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107757 积分:548124 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2019/8/7 11:49:00 [只看该作者]

他这个是使用的.net自带的打印吧,使用vs做开发的。Foxtable使用的是c1的打印功能,不是一码事,开发模式也不一样

 回到顶部
帅哥哟,离线,有人找我吗?
zto001
  12楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1465 积分:10403 威望:0 精华:0 注册:2018/10/16 11:42:00
  发帖心情 Post By:2019/8/7 13:39:00 [只看该作者]

https://zhidao.baidu.com/question/574038543.html

Option Explicit
Private Declare Function FindWindow Lib "user32" Acias "FindWindowA" _
(ByVal LpClassName As String,LpWindowName As String) As Long
Private Declare Function GetWindowRect Lib "user32" _
(ByVal hwnd As Long,lpRect As RECT) As Long
Private Type RECT
 Left As Long
 Top As Long
 Right As Long
 Bottom As Long
End Type
Dim NotepadHwnd as Long,NotepadRect as RECT
Private Sub Form_Load()
  Shell "c:\windows\notepad.exe",VbNormalFocus '打开记事本
  Me.Caption="窗口跟随于记事本上方,记事本关闭后结束程序"
  Me.Height=150
  Timer1.Interval=200:Timer1.Enabled=True
End Sub
Private Sub Timer1_Timer()
  NotepadHwnd=FindWindow("Notepad",VbNullString '获取记事本窗口句柄
  If NotepadHwnd Then '如果成功
    GetWindowRect NotepadHwnd,NotepadRect '获取窗口范围
    Me.Left=NotepadRect.Left * Screen.TwipsPerPixelX
    Me.Top=NotepadRect.Top * Screen.TwipsPerPixelY-Me.Height
    Me.Width=(NotepadRect.Right-NotepadRect.Left) * Screen.TwipsPerPixelX
  Else
    End
  End If
End Sub

怎么转成foxtable的代码?

 回到顶部
帅哥,在线噢!
有点蓝
  13楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107757 积分:548124 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2019/8/7 14:21:00 [只看该作者]

全局代码

Public Structure RECT
        Public left As Int32
        Public top As Int32
        Public right As Int32
        Public bottom As Int32
    End Structure
Public Declare Function FindWindow Lib "user32" Acias "FindWindowA" (ByVal LpClassName As String,LpWindowName As String) As Long
Public Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long,lpRect As RECT) As Long

调用,比如按钮
Dim Nrect as RECT
Dim Nhwnd=FindWindow(Nothing, "窗口标题名")
if Nhwnd <> 0 then
GetWindowRect(Nhwnd ,ByRef Nrect )
msgbox(Nrect.left )
end if

 回到顶部
总数 13 上一页 1 2