找回密码
 加入
搜索
楼主: xyhqqaa

[AU3基础] [已解决]如何正常收缩展开窗口(我爱你,Afan哥。谢谢)

 火.. [复制链接]
 楼主| 发表于 2012-2-17 14:06:38 | 显示全部楼层
回复 15# afan


    哇哇哇 哇哇哇 哇哇哇 哇哇哇 哇哇哇 哇哇哇
   果然在您的作品里面搜索您老人家就出现代码了。。。现在只想说  哇哇 哇哇 哇哇 哇哇 哇哇 哇哇 哇哇 哇哇。。好神奇,,AFAN哥。。我爱你。。。好神奇。。。 哇哇 哇哇 哇哇 哇哇 哇哇 哇哇
 楼主| 发表于 2012-2-17 14:07:39 | 显示全部楼层
贴上Afan哥的源码。。。怕一些鸟人跟俺一样马虎
Global $GuiW = 60, $InputW = 280, $StateFlag = 0
Global $sPic1 = @TempDir & '\p1.jpg', $sPic2 = @TempDir & '\p2.jpg'
_CKPic()

$hGui = GUICreate('', $GuiW, 47, 800, 50, 0x80000000) ;$WS_POPUP = 0x80000000
$iPic1 = GUICtrlCreatePic($sPic1, 1, 1, 49, 45)
GUICtrlSetCursor(-1, 0)
GUICtrlSetTip(-1, '点击伸缩、按住拖动')
GUICtrlSetResizing(-1, 260)
$iPic2 = GUICtrlCreatePic($sPic2, 50, 1, 9, 45)
GUICtrlSetResizing(-1, 260)
GUICtrlSetTip(-1, '退出')
$iInput = GUICtrlCreateInput('', -$InputW, 1, $InputW, 45)
GUICtrlSetFont(-1, 25, 400, 0, 'Arial')
GUICtrlSetBkColor(-1, 0xA4D1BC)
GUISetState()

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $iPic1
                        _Move()
                Case $iPic2
                        Exit

        EndSwitch
WEnd

Func _Move()
        Local $aWP = WinGetPos($hGui)
        If Not $StateFlag Then
                WinMove($hGui, '', $aWP[0] - $InputW, Default, $GuiW + $InputW)
                GUICtrlSetPos($iInput, 1, 1, $InputW)
        Else
                WinMove($hGui, '', $aWP[0] + $InputW, Default, $GuiW)
                GUICtrlSetPos($iInput, -$InputW, 1)
        EndIf
        $StateFlag = Not $StateFlag
        DllCall('user32.dll', 'lresult', 'SendMessageW', 'hwnd', $hGui, 'uint', 0x00A1, 'wparam', 2, 'lparam', 0)
EndFunc   ;==>_Move

Func _CKPic()
        If Not FileExists($sPic1) Then
                Local $Code = ''
                $Code &= '0xFFD8FFE000104A46494600010202000000000000FFE100BC45786966000049492A000800000006001201030001000000010000001A01050001000000560000001B010500010000005E0000002801030001000000020000001302030001000000010000006987040001000000660000000000000048000000010000004800000001000000060000900700040000003032303001910700040000000102030000A00700040000003031303101A00300010000000100000002A00400010000003100000003A00400010000002D00000000000000FFFE001E4143442053797374656D73204469676974616C20496D6167696E6700FFDB00840007040506050407060506070707080A110B0A09090A150F100C1119161A1A181618181C1F28221C1D261E1818232F2326292A2D2D2D1B213134312B34282C2D2B010B0B0B0F0D0F1E11111E402B242B4040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040FFC4008800000202030100000000000000000000000004050601020307100001020401060A08070100000000000001020300040511211213143141610615225155627194A1D132424352538192B12433357491B2C1F001000301010000000000000000000000000102040300110002020202020300000000000000'
                $Code &= '000000010203111204131421314151FFC0001108002D003103012200021101031101FFDA000C03010002110311003F00F582CD349BB94A907167D25AA5D04A8ED26E2347934661054ED2E98848DAA9740FF21579F01FC8CAC54BC91BFF00EC622A835069C54DCF3EBBCC170A1B49C736DECB76EB3D90D5C36229DBA7CB25E5E7783930E66D891A42D7EEA596CFF90D8629471E27A77764794537851372F3D2E50EA52AC9374F383B8C69C11A9392EE2A4DE714B648CA649F56DAC7663E11ACA9C4728C63CADA7A975CC52BA1E9DDD51E5066295D0F4EEEA8F28473E3DE1067C7BC22636EC7FA3BA3D23A1A43BA260D1E91D0D21DD1308693BC41A4EF103281BB206BF55436F3BA3BA91312EFE5A41C2E52AD57DF88F9C232818ACB26768AFE4398E7658FA4D1BE20EE883AF8BD7AA1FB973FB188ECD142F3AC38ECB3A7DAB0B2857F221A16383259D89B719AF459C5227DF7725601C75E3E50C4C4B314765B43CFDE65F5840C94E0D80729573B090922DBE2A4662AAA192E572AAA46D4E9045E3919D76953087DC5BB3124B369A6DC5955C63CAC71C0DBEF0F3E43923A954A97A3D038EE52DF9A233C7729F1531497D96B3626645E13324B00A5C4904A2FEAAB9A39916DA22752C86DECADE197BE3B93F889838EE4FE226289682D1D930EC90ED7FF005F9FE7D25CB7D46120073C4A56E5B2EBB3'
                $Code &= 'FCBB7E21C3ABAC614D13AE3E986C14CF8966CD8B01DBBF6C60804588041D861A1257F69E10194C072F7EA81817C3B483950BE0ECEAE69A497A9CB169896D66C70B8FBC48E764DD08729F301E61D054804F2D1B88F9EB86744B9B15E1D91A4BD319649CC84379471C945AF035FB28755CEBD649339C11B667ADE10667ADE11D823F0E67FFD9'
                $code = Binary($code)
                $hFO = FileOpen($sPic1, 2)
                FileWrite($hFO, $code)
                FileClose($hFO)
        EndIf
        If Not FileExists($sPic2) Then
                Local $Code = ''
                $Code &= '0xFFD8FFE000104A46494600010202000000000000FFE100BC45786966000049492A000800000006001201030001000000010000001A01050001000000560000001B010500010000005E0000002801030001000000020000001302030001000000010000006987040001000000660000000000000048000000010000004800000001000000060000900700040000003032303001910700040000000102030000A00700040000003031303101A00300010000000100000002A00400010000000900000003A00400010000002D00000000000000FFFE001E4143442053797374656D73204469676974616C20496D6167696E6700FFDB00840007040506050407060506070707080A110B0A09090A150F100C1119161A1A181618181C1F28221C1D261E1818232F2326292A2D2D2D1B213134312B34282C2D2B010B0B0B0F0D0F1E11111E402B242B4040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040FFC4006A00010101000000000000000000000000000607051000010303010509010000000000000000010203040005110621347173911314235253616281B1A20100030100000000000000000000000000010204031100030101010000000000000000000000000103110221FFC0001108002D0009030122000211'
                $Code &= '01031101FFDA000C03010002110311003F0075A7AC1A6E7D8204CB8DA5895324466DD90F3B952DD7149054A273B49249E3509DBF1E86AE9A5DE234C5B0646E8D0FE054333EE2B3205D265634FDEA1356080DAE42429319B04704806A4BE279852A83B8B1CB4FE517A5D27951BD13C1DC58E5A7F28BD6AB37C4B0D36D18C54500233DA633F58ACEEEC7D43D0501A517EE9FFFD9'
                $code = Binary($code)
                $hFO = FileOpen($sPic2, 2)
                FileWrite($hFO, $code)
                FileClose($hFO)
        EndIf
EndFunc   ;==>_CKPic
发表于 2012-2-17 14:14:06 | 显示全部楼层
好肉麻,是女子的话我接受,不然O2...

评分

参与人数 1贡献 +10 收起 理由
xyhqqaa + 10

查看全部评分

 楼主| 发表于 2012-2-17 15:02:04 | 显示全部楼层
回复 18# afan


   Afan哥,您的CODE是生成DLL文件吗。。。。我看得囧。。谢谢。。
发表于 2012-2-17 15:04:43 | 显示全部楼层
回复 19# xyhqqaa


    图片的16进制码,直接生成文件的,看路径…
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-11-19 14:37 , Processed in 0.067330 second(s), 15 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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