找回密码
 加入
搜索
查看: 1851|回复: 1

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

  [复制链接]
发表于 2008-10-6 11:15:25 | 显示全部楼层 |阅读模式
;如题
; 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
发表于 2008-10-6 11:26:50 | 显示全部楼层
你的脚本是想实现播放GIF的。以前我也确实用过这种方法来解决。
而现在官方有牛人写有API了,直接用API的吧。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-4-16 12:28 , Processed in 0.080966 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表