VBA WebBrowser capture full screen

前端 未结 2 1779
没有蜡笔的小新
没有蜡笔的小新 2020-12-14 23:57

Would like to do this within the confines of VBA (other users have no other development tools to modify). Am aware of 3rd party apps (iMacros, for example) that do similar b

2条回答
  •  臣服心动
    2020-12-15 00:51

    Dim objIe As Object
    Set objIe = CreateObject("internetexplorer.application")
        With objIe
            .Navigate "www.google.com"
            '// Set offline JIC user NOT Online
            .offline = True
            '// Maximise the Ie window if not Already Max
            .Visible = True
            '// This routine used to Maximise Ie
            ShowWindow objIe.hwnd, SW_MAXIMIZE
            SetForegroundWindow objIe.hwnd
        End With
    

    Public Const SW_MAXIMIZE As Long = 3       'Show window Maximised
    Public Const SW_MINIMIZE As Long = 1       'Show window Minimized
    
    Public Declare Function ShowWindow _
        Lib "user32" ( _
        ByVal hwnd As Long, _
        ByVal nCmdShow As Long) _
    As Long
    
    Public Declare Function SetForegroundWindow _
        Lib "user32" ( _
        ByVal hwnd As Long) _
    As Long
    

提交回复
热议问题