vvxt 发表于 2008-10-6 11:15:25

求牛人去除一下创建的IE边框

;如题
; Animated Gif
; Author - gafrost

Opt("MustDeclareVars", 1)
#include <IE.au3>

_Main()

Func _Main()
    Local $pheight = 50, $pwidth = 50, $oIE, $GUIActiveX, $gif
    $gif = FileOpenDialog("Select Animated Gif", @ScriptDir, "gif files (*.gif)", 3)
    If @error Then Exit
    _GetGifPixWidth_Height($gif, $pwidth, $pheight)
    $oIE = ObjCreate("Shell.Explorer.2")
    GUICreate("Embedded Web control Test", 640, 580)
    $GUIActiveX = GUICtrlCreateObj($oIE, 100, 100, $pwidth, $pheight)
    $oIE.navigate ("about:blank")
    While _IEPropertyGet($oIE, "busy")
      Sleep(100)
    WEnd
    $oIE.document.body.background = $gif
    $oIE.document.body.scroll = "no"
    GUISetState()
    While GUIGetMsg() <> -3
    WEnd
EndFunc   ;==>_Main

Func _GetGifPixWidth_Height($s_gif, ByRef $pwidth, ByRef $pheight)
    If FileGetSize($s_gif) > 9 Then
      Local $sizes = FileRead($s_gif, 10)
      ConsoleWrite("Gif version: " & StringMid($sizes, 1, 6) & @LF)
      $pwidth = Asc(StringMid($sizes, 8, 1)) * 256 + Asc(StringMid($sizes, 7, 1))
      $pheight = Asc(StringMid($sizes, 10, 1)) * 256 + Asc(StringMid($sizes, 9, 1))
      ConsoleWrite($pwidth & " x " & $pheight & @LF)
    EndIf
EndFunc   ;==>_GetGifPixWidth_Height

sanhen 发表于 2008-10-6 11:26:50

你的脚本是想实现播放GIF的。以前我也确实用过这种方法来解决。
而现在官方有牛人写有API了,直接用API的吧。
页: [1]
查看完整版本: 求牛人去除一下创建的IE边框