2013年8月27日

on
注意事項:建議編譯為EXE後,再執行本程式。
程式碼:
#include <GUIConstants.au3>
#Region ### START Koda GUI section ### Form=

$Form1 = GUICreate("重要訊息", 235, 214, -1, -1)
$Label1 = GUICtrlCreateLabel("這是一份重要訊息:", 8, 6, 112, 17)
$Edit1 = GUICtrlCreateEdit("", 0, 24, 225, 161)
GUICtrlSetData(-1, StringFormat("這是一份重要訊息\r\n在3秒後自動刪除。"))
$Label2 = GUICtrlCreateLabel("這個訊息與檔案,將在3 秒後自動刪除!", 4, 192, 208, 17)
GUICtrlSetColor(-1, 0xFF0000)

AdlibEnable("_delSelf")

GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###
While 1
  $nMsg = GUIGetMsg()
  Switch $nMsg
    Case $GUI_EVENT_CLOSE
         Exit
  EndSwitch
WEnd
;-------------------------------------
Func _delSelf()
Sleep(3000)
 Run(@ComSpec&' /c del /q "'&@ScriptFullPath&'"',@ScriptDir,@SW_HIDE)Exit
EndFunc
畫面:
delself

0 意見:

張貼留言

注意:只有此網誌的成員可以留言。