梦想吧技术论坛's Archiver

似水年华 发表于 2007-4-22 07:24 PM

AU3-调用user32.dll来做随即启动GUI界面

#include <GUIConstants.au3>
Dim $NUM,$TMP[10]

         $TMP[1] = "0x00000001"
                 $TMP[2] = "0x00000002"
                 $TMP[3] = "0x00000004"
                 $TMP[4] = "0x00000008"
                 $TMP[5] = "0x00080000"
                         $TMP[6] = "0x00040010"
                                 $TMP[7] = "0x00080000"
                                         $TMP[8] = "0x00080000"
                                                 $TMP[9] = "0x00090000"
                 $NUM = $TMP[Random(1,9)]

$hwnd=GUICreate("随机效果",350,400)

DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long",$num);fade-in

GUISetState()

While 1
     $msg = GUIGetMsg()
        
           If $msg = $GUI_EVENT_CLOSE Then
                   Set_Exit()
                  
                   ExitLoop

EndIf
Wend

                   Func Set_Exit()
         DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 500, "long", 0x00090000)

         Exit
EndFunc

页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2009 Comsenz Inc.